From 1710690c993ecd7095e7910604cdf4bf1dc244ca Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 9 Jan 2015 10:27:05 +0000 Subject: [PATCH] Avoid a PHP notice in _WP_Editors::wp_fullscreen_html() when no $post global is set. props marcochiesi. fixes #30071. git-svn-id: https://develop.svn.wordpress.org/trunk@31112 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-editor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php index 521c0ee67b..2fdf597533 100644 --- a/src/wp-includes/class-wp-editor.php +++ b/src/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.'); ?>