Upgrade/Install: Adjust the check for missing extensions during an upgrade so it remains compatible with versions of WordPress prior to 5.1.

The `WP_Error::has_errors()` method was introduced in WordPress 5.1, so this change uses its internal logic instead to remain compatible with earlier versions.

Props swissspidy, joemcgill, desrosj.

Fixes #63052
Built from https://develop.svn.wordpress.org/trunk@59956


git-svn-id: http://core.svn.wordpress.org/trunk@59298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn
2025-03-09 15:17:22 +00:00
parent ee6b7b969f
commit efa1334cd4
2 changed files with 2 additions and 2 deletions

View File

@@ -1199,7 +1199,7 @@ function update_core( $from, $to ) {
}
// Add a warning when required PHP extensions are missing.
if ( $missing_extensions->has_errors() ) {
if ( ! empty( $missing_extensions->errors ) ) {
return $missing_extensions;
}
}

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-beta1-59955';
$wp_version = '6.8-beta1-59956';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.