Revert fix for bug #53493 to be compliant with the XML specification

This commit is contained in:
Kalle Sommer Nielsen 2010-12-13 14:29:42 +00:00
parent 1081bd1528
commit d4b95b8bd6
2 changed files with 1 additions and 19 deletions

View file

@ -1,15 +0,0 @@
--TEST--
Bug #53493 (xmlrpc_decode should not be sensitive to leading whitespace)
--FILE--
<?php
$req = PHP_EOL .
'<?xml version="1.0"?><methodResponse><params><param>' .
'<value><string>Hello World</string></value></param>' .
'</params></methodResponse>';
var_dump(xmlrpc_decode($req));
echo "Done\n";
?>
--EXPECT--
string(11) "Hello World"
Done

View file

@ -845,10 +845,7 @@ PHP_FUNCTION(xmlrpc_decode)
}
if (return_value_used) {
zval* retval;
char *trimmed = php_trim(arg1, arg1_len, NULL, 0, NULL, 1 TSRMLS_CC);
retval = decode_request_worker(trimmed, strlen(trimmed), arg2_len ? arg2 : NULL, NULL);
zval* retval = decode_request_worker(arg1, arg1_len, arg2_len ? arg2 : NULL, NULL);
if (retval) {
*return_value = *retval;
FREE_ZVAL(retval);