Replace variable function calls with call_user_func().

Fixes "Call to undefined function \Curl\Decoder::decodeXml()" in PHP
5.3, 5.4, 5.5, 5.6, hhvm.
This commit is contained in:
Zach Borboa
2017-04-28 00:40:00 -07:00
parent 97319a51f8
commit 38f6825aa2
+2 -2
View File
@@ -1331,12 +1331,12 @@ class Curl
} elseif (preg_match($this->xmlPattern, $response_headers['Content-Type'])) {
$xml_decoder = $this->xmlDecoder;
if ($xml_decoder) {
$response = $xml_decoder($response);
$response = call_user_func($xml_decoder, $response);
}
} else {
$default_decoder = $this->defaultDecoder;
if ($default_decoder) {
$response = $default_decoder($response);
$response = call_user_func($default_decoder, $response);
}
}
}