mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-13 22:26:06 +01:00
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. Merges [48938] to the 5.5 branch. Fixes #51219. Built from https://develop.svn.wordpress.org/branches/5.5@48955 git-svn-id: http://core.svn.wordpress.org/branches/5.5@48717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0fb385f897
commit
ff206bc029
@ -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 );
|
||||
|
||||
?>
|
||||
</head>
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5.2-alpha-48936';
|
||||
$wp_version = '5.5.2-alpha-48955';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user