Ticket #16748: 16748-2.diff
File 16748-2.diff, 776 bytes (added by , 13 years ago) |
---|
-
xmlrpc.php
98 98 if ( isset($HTTP_RAW_POST_DATA) ) 99 99 logIO("I", $HTTP_RAW_POST_DATA); 100 100 101 function xmlrpc_die_handler( $message, $title = '', $args = array() ) { 102 global $wp_xmlrpc_server; 103 104 if ( $wp_xmlrpc_server ) { 105 $error = new IXR_Error(500, $message); 106 $wp_xmlrpc_server->output( $error->getXml() ); 107 } 108 } 109 110 add_filter( 'wp_die_handler', function( $handler ) { return 'xmlrpc_die_handler'; } ); 111 101 112 // Allow for a plugin to insert a different class to handle requests. 102 113 $wp_xmlrpc_server_class = apply_filters('wp_xmlrpc_server_class', 'wp_xmlrpc_server'); 103 114 $wp_xmlrpc_server = new $wp_xmlrpc_server_class;