Changeset 56735
- Timestamp:
- 09/27/2023 04:29:37 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r56689 r56735 1673 1673 1674 1674 if ( ! $info ) { 1675 $z->close(); 1675 1676 return new WP_Error( 'stat_failed_ziparchive', __( 'Could not retrieve file from archive.' ) ); 1676 1677 } … … 1710 1711 1711 1712 if ( $available_space && ( $required_space > $available_space ) ) { 1713 $z->close(); 1712 1714 return new WP_Error( 1713 1715 'disk_full_unzip_file', … … 1747 1749 // Only check to see if the Dir exists upon creation failure. Less I/O this way. 1748 1750 if ( ! $wp_filesystem->mkdir( $_dir, FS_CHMOD_DIR ) && ! $wp_filesystem->is_dir( $_dir ) ) { 1751 $z->close(); 1749 1752 return new WP_Error( 'mkdir_failed_ziparchive', __( 'Could not create directory.' ), $_dir ); 1750 1753 } … … 1775 1778 1776 1779 if ( ! $info ) { 1780 $z->close(); 1777 1781 return new WP_Error( 'stat_failed_ziparchive', __( 'Could not retrieve file from archive.' ) ); 1778 1782 } … … 1794 1798 1795 1799 if ( false === $contents ) { 1800 $z->close(); 1796 1801 return new WP_Error( 'extract_failed_ziparchive', __( 'Could not extract file from archive.' ), $info['name'] ); 1797 1802 } 1798 1803 1799 1804 if ( ! $wp_filesystem->put_contents( $to . $info['name'], $contents, FS_CHMOD_FILE ) ) { 1805 $z->close(); 1800 1806 return new WP_Error( 'copy_failed_ziparchive', __( 'Could not copy file.' ), $info['name'] ); 1801 1807 }
Note: See TracChangeset
for help on using the changeset viewer.