Changeset 56088
- Timestamp:
- 06/28/2023 10:07:49 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/update-core.php
r55990 r56088 1138 1138 $wp_filesystem->delete( $versions_file ); 1139 1139 1140 $php_version = PHP_VERSION; 1141 $mysql_version = $wpdb->db_version(); 1142 $old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from. 1143 $development_build = ( str_contains( $old_wp_version . $wp_version, '-' ) ); // A dash in the version indicates a development release. 1140 $php_version = PHP_VERSION; 1141 $mysql_version = $wpdb->db_version(); 1142 $old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from. 1143 /* 1144 * Note: str_contains() is not used here, as this file is included 1145 * when updating from older WordPress versions, in which case 1146 * the polyfills from wp-includes/compat.php may not be available. 1147 */ 1148 $development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' ) ); // A dash in the version indicates a development release. 1144 1149 $php_compat = version_compare( $php_version, $required_php_version, '>=' ); 1145 1150 … … 1243 1248 if ( is_array( $checksums ) ) { 1244 1249 foreach ( $checksums as $file => $checksum ) { 1245 if ( str_starts_with( $file, 'wp-content' ) ) { 1250 /* 1251 * Note: str_starts_with() is not used here, as this file is included 1252 * when updating from older WordPress versions, in which case 1253 * the polyfills from wp-includes/compat.php may not be available. 1254 */ 1255 if ( 'wp-content' === substr( $file, 0, 10 ) ) { 1246 1256 continue; 1247 1257 } … … 1350 1360 if ( isset( $checksums ) && is_array( $checksums ) ) { 1351 1361 foreach ( $checksums as $file => $checksum ) { 1352 if ( str_starts_with( $file, 'wp-content' ) ) { 1362 /* 1363 * Note: str_starts_with() is not used here, as this file is included 1364 * when updating from older WordPress versions, in which case 1365 * the polyfills from wp-includes/compat.php may not be available. 1366 */ 1367 if ( 'wp-content' === substr( $file, 0, 10 ) ) { 1353 1368 continue; 1354 1369 } … … 1765 1780 1766 1781 if ( file_exists( "{$directory}example.html" ) 1767 && str_contains( file_get_contents( "{$directory}example.html" ), '<title>Genericons</title>' ) 1782 /* 1783 * Note: str_contains() is not used here, as this file is included 1784 * when updating from older WordPress versions, in which case 1785 * the polyfills from wp-includes/compat.php may not be available. 1786 */ 1787 && false !== strpos( file_get_contents( "{$directory}example.html" ), '<title>Genericons</title>' ) 1768 1788 ) { 1769 1789 $files[] = "{$directory}example.html"; … … 1774 1794 $dirs, 1775 1795 static function( $dir ) { 1776 // Skip any node_modules directories. 1777 return ! str_contains( $dir, 'node_modules' ); 1796 /* 1797 * Skip any node_modules directories. 1798 * 1799 * Note: str_contains() is not used here, as this file is included 1800 * when updating from older WordPress versions, in which case 1801 * the polyfills from wp-includes/compat.php may not be available. 1802 */ 1803 return false === strpos( $dir, 'node_modules' ); 1778 1804 } 1779 1805 );
Note: See TracChangeset
for help on using the changeset viewer.