Upgrade/Install: Prevent plugin auto updates if PHP version requirements are not satisfied.
In [44937] and [44939], changes were made to prevent a user from updating any plugin that requires a higher version of PHP than the site is running. This compliments those changes to also prevent plugins from being auto updated when the same requirements are not met. Props: TimothyBlynJacobs, davidbaumwald. Fixes #46613. Built from https://develop.svn.wordpress.org/trunk@45165 git-svn-id: http://core.svn.wordpress.org/trunk@44974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8b0cc1c90f
commit
8d04086af3
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue