Skip to content

Commit

Permalink
FIX Client
Browse files Browse the repository at this point in the history
  • Loading branch information
goten4 committed May 22, 2015
1 parent 977e77c commit 521b1af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/KmbPmProxy/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ protected function send($method, $uri, $content = null)
}
$this->logRequest($start, $httpResponse->renderStatusLine(), $uri);

$body = $httpResponse->getBody();
$result = Json::decode(trim($body));
$body = trim($httpResponse->getBody());
$result = empty($body) ? null : Json::decode($body);
$message = $result !== null && !empty($result->message) ? $result->message : $httpResponse->renderStatusLine();
if ($httpResponse->isNotFound()) {
throw new NotFoundException($message);
Expand Down

0 comments on commit 521b1af

Please sign in to comment.