mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 15:17:42 +02:00
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:
parent
39195303f1
commit
6d40d77615
@ -932,7 +932,7 @@ function wp_upload_bits($name, $type, $bits) {
|
|||||||
// Compute the URL
|
// Compute the URL
|
||||||
$url = $upload['url'] . "/$filename";
|
$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);
|
$upload = wp_upload_bits($name, $type, $bits);
|
||||||
if ( $upload['error'] !== false ) {
|
if ( ! empty($upload['error']) ) {
|
||||||
logIO('O', '(MW) Could not write file '.$name);
|
logIO('O', '(MW) Could not write file '.$name);
|
||||||
return new IXR_Error(500, 'Could not write file '.$name);
|
return new IXR_Error(500, 'Could not write file '.$name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user