WordPress.org

Make WordPress Core

Ticket #3981: xmlrpc.php.diff

File xmlrpc.php.diff, 623 bytes (added by redsweater, 11 years ago)

Diffs to enhance verbose error propagation from newMediaObject failure.

  • xmlrpc.php

     
    14181418
    14191419                $upload = wp_upload_bits($name, $type, $bits, $overwrite);
    14201420                if ( ! empty($upload['error']) ) {
    1421                         logIO('O', '(MW) Could not write file '.$name);
    1422                         return new IXR_Error(500, 'Could not write file '.$name);
     1421                        $errorString = 'Could not write file ' . $name . ' (' . $upload['error'] . ')';
     1422                        logIO('O', '(MW) ' . $errorString);
     1423                        return new IXR_Error(500, $errorString);
    14231424                }
    14241425                // Construct the attachment array
    14251426                // attach to post_id -1