Skip to content

Commit

Permalink
Fixed uncatched json_decode exception
Browse files Browse the repository at this point in the history
  • Loading branch information
thakilla committed Aug 21, 2015
1 parent cafbfe0 commit ff01c8a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions FACTFinder/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,17 @@ protected function getResponseContent()

// PHP does not (yet?) support $this->method($args) for callable
// properties

$this->responseContent = $this->responseContentProcessor->__invoke($content);
if ($this->encodingConverter != null)
{
$this->responseContent = $this->encodingConverter->encodeContentForPage($this->responseContent);

if($content !== null) {
$this->responseContent = $this->responseContentProcessor->__invoke($content);
if ($this->encodingConverter != null)
{
$this->responseContent = $this->encodingConverter->encodeContentForPage($this->responseContent);
}
} else {
$this->responseContent = array();
}

$this->lastResponse = $response;
}

Expand Down

0 comments on commit ff01c8a

Please sign in to comment.