Got and fixed an error 'faultCode -32700 faultString parse error. not well formed' on XMLRPC request.
|Reported by:||Minor||Owned by:|
I've worked with XML-RPC requests and founded that some of my requests got this error. As I'm a developer - it's my work to repair the bugs.
I've founded the bug in the 'wp-includes/class-IXR.php' file. There is a problem in the 157 string (Class IXR_Message, function parse, string 2). Here it is.
'$this->message = preg_replace('/<\?xml(.*)?\?'.'>/', , $this->message);'
$this->message value before this string was correct but after preg_replace it's value sometimes became NULL.
There is a topics where this problem is discussed.
I've founded a solution to fix that. Change that string to
'$this->message = preg_replace('/<\?xml.*?\?'.'>/', , $this->message);'
( only round brackets were deleted).
I've founded and fixed this bug on the WP 2.6 - 2.6.2 on PHP 5.2.6 (Linuks) and 5.2.4 (Windows).