mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
Site Health: Verify PHP version requirements when auto-updating themes.
Follow up of [47819]. See #49653. Fixes #50411. git-svn-id: https://develop.svn.wordpress.org/trunk@48071 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -214,8 +214,8 @@ class WP_Automatic_Updater {
|
||||
}
|
||||
}
|
||||
|
||||
// If updating a plugin, ensure the minimum PHP version requirements are satisfied.
|
||||
if ( 'plugin' === $type ) {
|
||||
// If updating a plugin or theme, ensure the minimum PHP version requirements are satisfied.
|
||||
if ( in_array( $type, array( 'plugin', 'theme' ), true ) ) {
|
||||
if ( ! empty( $item->requires_php ) && version_compare( phpversion(), $item->requires_php, '<' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user