mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 04:01:47 +00:00
Merge pull request #184 from zachborboa/master
Fix #183: Fix "Function name must be callable" warning
This commit is contained in:
+3
-1
@@ -837,7 +837,9 @@ class Curl
|
||||
if (isset($response_headers['Content-Type'])) {
|
||||
if (preg_match($this->json_pattern, $response_headers['Content-Type'])) {
|
||||
$json_decoder = $this->json_decoder;
|
||||
$response = $json_decoder($response);
|
||||
if (is_callable($json_decoder)) {
|
||||
$response = $json_decoder($response);
|
||||
}
|
||||
} elseif (preg_match($this->xml_pattern, $response_headers['Content-Type'])) {
|
||||
$xml_obj = @simplexml_load_string($response);
|
||||
if (!($xml_obj === false)) {
|
||||
|
||||
Reference in New Issue
Block a user