From 4926111056aef668e893e0912e2d591200cd8b18 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@5054 602fd350-edb4-49c9-b593-d223f7449a82 --- 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