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:
Ryan Boren 2005-12-29 02:07:10 +00:00
parent 164371f70f
commit dbde443d4a
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}
?>

View File

@ -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);
}