From 2be2af77895aeb7070ca9fd9ca3f6d4c3e95af08 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 9 Jan 2015 10:28:23 +0000 Subject: [PATCH] Avoid a PHP notice in _WP_Editors::wp_fullscreen_html() when no $post global is set. props marcochiesi. fixes #30071. Built from https://develop.svn.wordpress.org/trunk@31112 git-svn-id: http://core.svn.wordpress.org/trunk@31093 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-editor.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 521c0ee67b..2fdf597533 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -1251,7 +1251,7 @@ final class _WP_Editors { $width = isset( $content_width ) && 800 > $content_width ? $content_width : 800; $width = $width + 22; // compensate for the padding and border $dfw_width = get_user_setting( 'dfw_width', $width ); - $save = isset( $post->post_status ) && $post->post_status == 'publish' ? __('Update') : __('Save'); + $save = $post && $post->post_status == 'publish' ? __('Update') : __('Save'); ?>
@@ -1316,7 +1316,7 @@ final class _WP_Editors {
- post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?> + post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?>
diff --git a/wp-includes/version.php b/wp-includes/version.php index ca6815b3d6..18b7506953 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31111'; +$wp_version = '4.2-alpha-31112'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.