Changeset 45583 for trunk/src/wp-admin/includes/file.php
- Timestamp:
- 07/01/2019 12:50:14 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r45580 r45583 822 822 * overriding this one. 823 823 */ 824 if ( ! ( ( $uploads = wp_upload_dir( $time ) ) && false === $uploads['error'] ) ) { 824 $uploads = wp_upload_dir( $time ); 825 if ( ! ( $uploads && false === $uploads['error'] ) ) { 825 826 return call_user_func_array( $upload_error_handler, array( &$file, $uploads['error'] ) ); 826 827 } … … 1252 1253 mbstring_binary_safe_encoding(); 1253 1254 1254 $skipped_key = $skipped_signature = 0; 1255 $skipped_key = 0; 1256 $skipped_signature = 0; 1255 1257 1256 1258 foreach ( (array) $signatures as $signature ) { … … 1433 1435 1434 1436 for ( $i = 0; $i < $z->numFiles; $i++ ) { 1435 if ( ! $info = $z->statIndex( $i ) ) { 1437 $info = $z->statIndex( $i ); 1438 if ( ! $info ) { 1436 1439 return new WP_Error( 'stat_failed_ziparchive', __( 'Could not retrieve file from archive.' ) ); 1437 1440 } … … 1448 1451 $uncompressed_size += $info['size']; 1449 1452 1453 $dirname = dirname( $info['name'] ); 1454 1450 1455 if ( '/' === substr( $info['name'], -1 ) ) { 1451 1456 // Directory. 1452 1457 $needed_dirs[] = $to . untrailingslashit( $info['name'] ); 1453 } elseif ( '.' !== $dirname = dirname( $info['name'] )) {1458 } elseif ( '.' !== $dirname ) { 1454 1459 // Path to a file. 1455 1460 $needed_dirs[] = $to . untrailingslashit( $dirname ); … … 1497 1502 1498 1503 for ( $i = 0; $i < $z->numFiles; $i++ ) { 1499 if ( ! $info = $z->statIndex( $i ) ) { 1504 $info = $z->statIndex( $i ); 1505 if ( ! $info ) { 1500 1506 return new WP_Error( 'stat_failed_ziparchive', __( 'Could not retrieve file from archive.' ) ); 1501 1507 } … … 1830 1836 1831 1837 // Attempt to determine the file owner of the WordPress files, and that of newly created files 1832 $wp_file_owner = $temp_file_owner = false; 1838 $wp_file_owner = false; 1839 $temp_file_owner = false; 1833 1840 if ( function_exists( 'fileowner' ) ) { 1834 1841 $wp_file_owner = @fileowner( __FILE__ );
Note: See TracChangeset
for help on using the changeset viewer.