From a8e86c768ca02b1042d515dd835cb76783f16565 Mon Sep 17 00:00:00 2001 From: desrosj Date: Thu, 29 Oct 2020 18:06:13 +0000 Subject: [PATCH] Upgrade/install: Improve logic check when determining installation status. Improve handling of ambiguous return values to determine if a blog is installed. Props zieladam, xknown. Merges [49377] to trunk. Built from https://develop.svn.wordpress.org/trunk@49386 git-svn-id: http://core.svn.wordpress.org/trunk@49145 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 537425d898..3d0412630e 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1756,7 +1756,8 @@ function is_blog_installed() { continue; } - if ( ! $wpdb->get_results( "DESCRIBE $table;" ) ) { + $described_table = $wpdb->get_results( "DESCRIBE $table;" ); + if ( is_array( $described_table ) && count( $described_table ) === 0 ) { continue; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 0569a16ea2..905e6d8c04 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-beta2-49385'; +$wp_version = '5.6-beta2-49386'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.