Fix #543: Use original response when xml decode fails

This commit is contained in:
Zach Borboa
2018-08-23 22:47:25 -07:00
parent 34c751ce09
commit a053ed73ad
+3 -3
View File
@@ -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;
}