diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index 74a8ea065b..f9d036fada 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -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); } ?> diff --git a/xmlrpc.php b/xmlrpc.php index bac38e11a6..f3edb64430 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -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); }