diff --git a/xmlrpc.php b/xmlrpc.php index ce1171afba..58d8806be2 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -1418,8 +1418,9 @@ class wp_xmlrpc_server extends IXR_Server { $upload = wp_upload_bits($name, $type, $bits, $overwrite); if ( ! empty($upload['error']) ) { - logIO('O', '(MW) Could not write file '.$name); - return new IXR_Error(500, 'Could not write file '.$name); + $errorString = 'Could not write file ' . $name . ' (' . $upload['error'] . ')'; + logIO('O', '(MW) ' . $errorString); + return new IXR_Error(500, $errorString); } // Construct the attachment array // attach to post_id -1