mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Standardise WP_Filesystem_*::put_contents() arguments to support chmod reliably across all transports. Fixes #10889
git-svn-id: https://develop.svn.wordpress.org/trunk@12723 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -550,9 +550,8 @@ function unzip_file($file, $to) {
|
||||
|
||||
// We've made sure the folders are there, so let's extract the file now:
|
||||
if ( ! $file['folder'] ) {
|
||||
if ( !$fs->put_contents( $to . $file['filename'], $file['content']) )
|
||||
if ( !$fs->put_contents( $to . $file['filename'], $file['content'], FS_CHMOD_FILE) )
|
||||
return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']);
|
||||
$fs->chmod($to . $file['filename'], FS_CHMOD_FILE);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user