diff --git a/wp-admin/includes/class-wp-automatic-updater.php b/wp-admin/includes/class-wp-automatic-updater.php index e3fc5eb784..4a05e9868f 100644 --- a/wp-admin/includes/class-wp-automatic-updater.php +++ b/wp-admin/includes/class-wp-automatic-updater.php @@ -205,6 +205,13 @@ class WP_Automatic_Updater { } } + // If updating a plugin, ensure the minimum PHP version requirements are satisfied. + if ( 'plugin' === $type ) { + if ( ! empty( $item->requires_php ) && version_compare( phpversion(), $item->requires_php, '<' ) ) { + return false; + } + } + return true; } diff --git a/wp-includes/version.php b/wp-includes/version.php index e47b357a66..5b70aefd87 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-beta2-45164'; +$wp_version = '5.2-beta2-45165'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.