Fix bad bracketing in unzip_file()
git-svn-id: https://develop.svn.wordpress.org/trunk@8580 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
eb3daa5799
commit
80a4ec8e37
@ -384,11 +384,12 @@ function unzip_file($file, $to) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We've made sure the folders are there, so let's extract the file now:
|
// We've made sure the folders are there, so let's extract the file now:
|
||||||
if ( ! $file['folder'] )
|
if ( ! $file['folder'] ) {
|
||||||
if ( !$fs->put_contents( $to . $file['filename'], $file['content']) )
|
if ( !$fs->put_contents( $to . $file['filename'], $file['content']) )
|
||||||
return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']);
|
return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']);
|
||||||
$fs->chmod($to . $file['filename'], 0644);
|
$fs->chmod($to . $file['filename'], 0644);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user