More wp_upload_bits() fixes.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-29 02:07:10 +00:00
parent 39195303f1
commit 6d40d77615
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);
}