diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-admin/network/upgrade.php --- a/wp/wp-admin/network/upgrade.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-admin/network/upgrade.php Tue Dec 15 13:49:49 2020 +0100 @@ -8,9 +8,9 @@ */ /** Load WordPress Administration Bootstrap */ -require_once( dirname( __FILE__ ) . '/admin.php' ); +require_once __DIR__ . '/admin.php'; -require_once( ABSPATH . WPINC . '/http.php' ); +require_once ABSPATH . WPINC . '/http.php'; $title = __( 'Upgrade Network' ); $parent_file = 'upgrade.php'; @@ -28,11 +28,11 @@ get_current_screen()->set_help_sidebar( '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Upgrade Network' ) . '

' . + '

' . __( 'Documentation on Upgrade Network' ) . '

' . '

' . __( 'Support' ) . '

' ); -require_once( ABSPATH . 'wp-admin/admin-header.php' ); +require_once ABSPATH . 'wp-admin/admin-header.php'; if ( ! current_user_can( 'upgrade_network' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); @@ -49,7 +49,7 @@ if ( $n < 5 ) { /** - * @global string $wp_db_version + * @global int $wp_db_version WordPress database version. */ global $wp_db_version; update_site_option( 'wpmu_upgrade_site', $wp_db_version ); @@ -90,10 +90,11 @@ 'sslverify' => false, ) ); + if ( is_wp_error( $response ) ) { wp_die( sprintf( - /* translators: 1: site url, 2: server error message */ + /* translators: 1: Site URL, 2: Server error message. */ __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s' ), $siteurl, '' . $response->get_error_message() . '' @@ -109,6 +110,7 @@ * @param array|WP_Error $response The upgrade response array or WP_Error on failure. */ do_action( 'after_mu_upgrade', $response ); + /** * Fires after each site has been upgraded. * @@ -132,7 +134,7 @@ break; case 'show': default: - if ( get_site_option( 'wpmu_upgrade_site' ) != $GLOBALS['wp_db_version'] ) : + if ( (int) get_site_option( 'wpmu_upgrade_site' ) !== $GLOBALS['wp_db_version'] ) : ?>

@@ -152,4 +154,4 @@ ?> - +