rebase on oct-10-2023
This commit is contained in:
@@ -332,7 +332,7 @@ class WP_Site_Health_Auto_Updates {
|
||||
}
|
||||
|
||||
$checksums = get_core_checksums( $wp_version, 'en_US' );
|
||||
$dev = ( false !== strpos( $wp_version, '-' ) );
|
||||
$dev = ( str_contains( $wp_version, '-' ) );
|
||||
// Get the last stable version's files and test against that.
|
||||
if ( ! $checksums && $dev ) {
|
||||
$checksums = get_core_checksums( (float) $wp_version - 0.1, 'en_US' );
|
||||
@@ -358,7 +358,7 @@ class WP_Site_Health_Auto_Updates {
|
||||
|
||||
$unwritable_files = array();
|
||||
foreach ( array_keys( $checksums ) as $file ) {
|
||||
if ( 'wp-content' === substr( $file, 0, 10 ) ) {
|
||||
if ( str_starts_with( $file, 'wp-content' ) ) {
|
||||
continue;
|
||||
}
|
||||
if ( ! file_exists( ABSPATH . $file ) ) {
|
||||
@@ -396,7 +396,7 @@ class WP_Site_Health_Auto_Updates {
|
||||
public function test_accepts_dev_updates() {
|
||||
require ABSPATH . WPINC . '/version.php'; // $wp_version; // x.y.z
|
||||
// Only for dev versions.
|
||||
if ( false === strpos( $wp_version, '-' ) ) {
|
||||
if ( ! str_contains( $wp_version, '-' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user