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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user