Changeset 55990 for trunk/src/wp-admin/includes/file.php
- Timestamp:
- 06/22/2023 02:55:47 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r55988 r55990 1254 1254 $signature_url = false; 1255 1255 1256 if ( is_string( $url_path ) && ( '.zip' === substr( $url_path, -4 ) || '.tar.gz' === substr( $url_path, -7) ) ) {1256 if ( is_string( $url_path ) && ( str_ends_with( $url_path, '.zip' ) || str_ends_with( $url_path, '.tar.gz' ) ) ) { 1257 1257 $signature_url = str_replace( $url_path, $url_path . '.sig', $url ); 1258 1258 } … … 1647 1647 } 1648 1648 1649 if ( '__MACOSX/' === substr( $info['name'], 0, 9) ) { // Skip the OS X-created __MACOSX directory.1649 if ( str_starts_with( $info['name'], '__MACOSX/' ) ) { // Skip the OS X-created __MACOSX directory. 1650 1650 continue; 1651 1651 } … … 1660 1660 $dirname = dirname( $info['name'] ); 1661 1661 1662 if ( '/' === substr( $info['name'], -1) ) {1662 if ( str_ends_with( $info['name'], '/' ) ) { 1663 1663 // Directory. 1664 1664 $needed_dirs[] = $to . untrailingslashit( $info['name'] ); … … 1727 1727 } 1728 1728 1729 if ( '/' === substr( $info['name'], -1) ) { // Directory.1729 if ( str_ends_with( $info['name'], '/' ) ) { // Directory. 1730 1730 continue; 1731 1731 } 1732 1732 1733 if ( '__MACOSX/' === substr( $info['name'], 0, 9) ) { // Don't extract the OS X-created __MACOSX directory files.1733 if ( str_starts_with( $info['name'], '__MACOSX/' ) ) { // Don't extract the OS X-created __MACOSX directory files. 1734 1734 continue; 1735 1735 } … … 1801 1801 // Determine any children directories needed (From within the archive). 1802 1802 foreach ( $archive_files as $file ) { 1803 if ( '__MACOSX/' === substr( $file['filename'], 0, 9) ) { // Skip the OS X-created __MACOSX directory.1803 if ( str_starts_with( $file['filename'], '__MACOSX/' ) ) { // Skip the OS X-created __MACOSX directory. 1804 1804 continue; 1805 1805 } … … 1867 1867 } 1868 1868 1869 if ( '__MACOSX/' === substr( $file['filename'], 0, 9) ) { // Don't extract the OS X-created __MACOSX directory files.1869 if ( str_starts_with( $file['filename'], '__MACOSX/' ) ) { // Don't extract the OS X-created __MACOSX directory files. 1870 1870 continue; 1871 1871 }
Note: See TracChangeset
for help on using the changeset viewer.