Site Health: Verify PHP version requirements when auto-updating themes.

Follow up of [47819].
See #49653.
Fixes #50411.
Built from https://develop.svn.wordpress.org/trunk@48071


git-svn-id: http://core.svn.wordpress.org/trunk@47838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2020-06-17 14:48:07 +00:00
parent a9a6b25cae
commit 689fdc6319
2 changed files with 3 additions and 3 deletions

View File

@ -214,8 +214,8 @@ class WP_Automatic_Updater {
} }
} }
// If updating a plugin, ensure the minimum PHP version requirements are satisfied. // If updating a plugin or theme, ensure the minimum PHP version requirements are satisfied.
if ( 'plugin' === $type ) { if ( in_array( $type, array( 'plugin', 'theme' ), true ) ) {
if ( ! empty( $item->requires_php ) && version_compare( phpversion(), $item->requires_php, '<' ) ) { if ( ! empty( $item->requires_php ) && version_compare( phpversion(), $item->requires_php, '<' ) ) {
return false; return false;
} }

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.5-alpha-48070'; $wp_version = '5.5-alpha-48071';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.