More wp_upload_bits() fixes.
git-svn-id: https://develop.svn.wordpress.org/trunk@3378 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
164371f70f
commit
dbde443d4a
@ -932,7 +932,7 @@ function wp_upload_bits($name, $type, $bits) {
|
||||
// Compute the URL
|
||||
$url = $upload['url'] . "/$filename";
|
||||
|
||||
return array('file' => $new_file, 'url' => $url);
|
||||
return array('file' => $new_file, 'url' => $url, 'error' => false);
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -853,7 +853,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
}
|
||||
|
||||
$upload = wp_upload_bits($name, $type, $bits);
|
||||
if ( $upload['error'] !== false ) {
|
||||
if ( ! empty($upload['error']) ) {
|
||||
logIO('O', '(MW) Could not write file '.$name);
|
||||
return new IXR_Error(500, 'Could not write file '.$name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user