From 92456a8d4b1b9b7ee8634de3d673aa35aee99e26 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 17 Jun 2020 14:46:23 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/class-wp-automatic-updater.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/class-wp-automatic-updater.php b/src/wp-admin/includes/class-wp-automatic-updater.php index a1efdc2bb2..77a4149406 100644 --- a/src/wp-admin/includes/class-wp-automatic-updater.php +++ b/src/wp-admin/includes/class-wp-automatic-updater.php @@ -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; }