From 2ca15d1e5ce70493c5c0c096ca0c76503d6da07c Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 29 Oct 2020 18:03:35 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@49386 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 537425d8981ab..3d0412630e1ca 100644 --- a/src/wp-includes/functions.php +++ b/src/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; }