mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-27 18:50:43 +00:00
Fix #543: Use original response when xml decode fails
This commit is contained in:
@@ -44,9 +44,9 @@ class Decoder
|
||||
public static function decodeXml()
|
||||
{
|
||||
$args = func_get_args();
|
||||
$xml_obj = @call_user_func_array('simplexml_load_string', $args);
|
||||
if (!($xml_obj === false)) {
|
||||
$response = $xml_obj;
|
||||
$response = @call_user_func_array('simplexml_load_string', $args);
|
||||
if ($response === false) {
|
||||
$response = $args['0'];
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user