From 7136d650283c91121d1e19c76b27b16eddf28b74 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 16 Mar 2007 22:12:15 +0000 Subject: [PATCH] Improve error propagation from newMediaObject failure in xmlrpc.php. Props Daniel Jalkut (Red Sweater Software). fixes #3981 for 2.2 git-svn-id: http://svn.automattic.com/wordpress/trunk@5054 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- xmlrpc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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