mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-18 20:49:59 +00:00
Site Health: Check if session_status() exists before calling it.
Merges [48742] to the 5.5 branch. Reviewed by desrosj, SergeyBiryukov. Props bgermann. Fixes #50862. Built from https://develop.svn.wordpress.org/branches/5.5@48746 git-svn-id: http://core.svn.wordpress.org/branches/5.5@48508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
96a9d51e11
commit
081d50e68f
@ -1115,7 +1115,7 @@ class WP_Site_Health {
|
|||||||
'test' => 'php_sessions',
|
'test' => 'php_sessions',
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( PHP_SESSION_ACTIVE === session_status() ) {
|
if ( function_exists( 'session_status' ) && PHP_SESSION_ACTIVE === session_status() ) {
|
||||||
$result['status'] = 'critical';
|
$result['status'] = 'critical';
|
||||||
|
|
||||||
$result['label'] = __( 'An active PHP session was detected' );
|
$result['label'] = __( 'An active PHP session was detected' );
|
||||||
|
@ -555,7 +555,7 @@ function wp_edit_theme_plugin_file( $args ) {
|
|||||||
$url = admin_url();
|
$url = admin_url();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( PHP_SESSION_ACTIVE === session_status() ) {
|
if ( function_exists( 'session_status' ) && PHP_SESSION_ACTIVE === session_status() ) {
|
||||||
// Close any active session to prevent HTTP requests from timing out
|
// Close any active session to prevent HTTP requests from timing out
|
||||||
// when attempting to connect back to the site.
|
// when attempting to connect back to the site.
|
||||||
session_write_close();
|
session_write_close();
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-RC2-48740';
|
$wp_version = '5.5-RC2-48746';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user