From 3d06de26a30ba7b8db87fea11274b6a636368b7c Mon Sep 17 00:00:00 2001 From: desrosj Date: Thu, 19 Sep 2019 14:30:56 +0000 Subject: [PATCH] PHP 7.4: Fix another instance of array access on a datatype that cannot be accessed as an array. PHP 7.4 adds a warning when trying access a null/bool/int/float/resource (everything but array, string and object) as if it were an array. Follow up of [45639]. Props desrosj, jrf. See #47704. Built from https://develop.svn.wordpress.org/trunk@46185 git-svn-id: http://core.svn.wordpress.org/trunk@45997 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/update.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index c2b8a4257b..89cb1f858a 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -707,7 +707,7 @@ function maintenance_nag() { * This flag is cleared whenever a successful update occurs using Core_Upgrader. */ $comparison = ! empty( $failed['critical'] ) ? '>=' : '>'; - if ( version_compare( $failed['attempted'], $wp_version, $comparison ) ) { + if ( isset( $failed['attempted'] ) && version_compare( $failed['attempted'], $wp_version, $comparison ) ) { $nag = true; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 7c388052de..275382f1b0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-46184'; +$wp_version = '5.3-alpha-46185'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.