Fix bad bracketing in unzip_file()
git-svn-id: http://svn.automattic.com/wordpress/trunk@8580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e6971c04f1
commit
57e2267904
|
@ -384,10 +384,11 @@ 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