From 6884e1340d667ce7de13d7de1063e5d928443d10 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 19 Nov 2020 12:03:11 +0000 Subject: [PATCH] Coding Standards: Remove redundant `isset()` check in `core_upgrade_preamble()`. `isset()` can be safely used to check properties and subproperties of objects directly. Follow-up to [49638]. See #51799. git-svn-id: https://develop.svn.wordpress.org/trunk@49668 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/update-core.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index 47f4b6ae52..3beb87b6ed 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -232,7 +232,7 @@ function core_upgrade_preamble() { $wp_version = get_bloginfo( 'version' ); $updates = get_core_updates(); - if ( isset( $updates[0] ) && isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) { + if ( isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) { echo '

'; _e( 'An updated version of WordPress is available.' ); echo '

'; @@ -258,6 +258,7 @@ function core_upgrade_preamble() { echo ''; } echo ''; + // Don't show the maintenance mode notice when we are only showing a single re-install option. if ( $updates && ( count( $updates ) > 1 || 'latest' !== $updates[0]->response ) ) { echo '

' . __( 'While your site is being updated, it will be in maintenance mode. As soon as your updates are complete, this mode will be deactivated.' ) . '

'; @@ -270,6 +271,7 @@ function core_upgrade_preamble() { $normalized_version ) . '

'; } + dismissed_updates(); }