From 6d0491119e77f3e04046aaffc2d70b6dd3dac4cb Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 3 Sep 2020 01:43:07 +0000 Subject: [PATCH] Administration: Give the `$error` variable in `wp-admin/admin-header.php` a more descriptive name. This avoids a conflict with the same global variable used elsewhere, e.g. in Theme Editor. Follow-up to [48850]. Props vinayak.anivase. Fixes #51219. Built from https://develop.svn.wordpress.org/trunk@48938 git-svn-id: http://core.svn.wordpress.org/trunk@48700 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-header.php | 8 ++++---- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 7c59ec0baf..35b1686b51 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -198,18 +198,18 @@ if ( $current_screen->is_block_editor() ) { } } -$error = error_get_last(); +$error_get_last = error_get_last(); // Print a CSS class to make PHP errors visible. -if ( $error && WP_DEBUG && WP_DEBUG_DISPLAY && ini_get( 'display_errors' ) +if ( $error_get_last && WP_DEBUG && WP_DEBUG_DISPLAY && ini_get( 'display_errors' ) // Don't print the class for PHP notices in wp-config.php, as they happen before WP_DEBUG takes effect, // and should not be displayed with the `error_reporting` level previously set in wp-load.php. - && ( E_NOTICE !== $error['type'] || 'wp-config.php' !== wp_basename( $error['file'] ) ) + && ( E_NOTICE !== $error_get_last['type'] || 'wp-config.php' !== wp_basename( $error_get_last['file'] ) ) ) { $admin_body_class .= ' php-error'; } -unset( $error ); +unset( $error_get_last ); ?> diff --git a/wp-includes/version.php b/wp-includes/version.php index fa93ef2f85..63437ed368 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48937'; +$wp_version = '5.6-alpha-48938'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.