We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6ea53b commit 7088b40Copy full SHA for 7088b40
src/Curl/Curl.php
@@ -837,7 +837,9 @@ private function parseResponse($response_headers, $raw_response)
837
if (isset($response_headers['Content-Type'])) {
838
if (preg_match($this->json_pattern, $response_headers['Content-Type'])) {
839
$json_decoder = $this->json_decoder;
840
- $response = $json_decoder($response);
+ if (is_callable($json_decoder)) {
841
+ $response = $json_decoder($response);
842
+ }
843
} elseif (preg_match($this->xml_pattern, $response_headers['Content-Type'])) {
844
$xml_obj = @simplexml_load_string($response);
845
if (!($xml_obj === false)) {
0 commit comments