Skip to content

Commit

Permalink
Revert "get response in checkCurlErrors"
Browse files Browse the repository at this point in the history
This reverts commit 416f594
  • Loading branch information
Reindert committed Sep 29, 2017
1 parent ae45de3 commit d56aed8
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/Model/MyParcelRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ public function sendRequest($method = 'POST', $uri = self::REQUEST_TYPE_SHIPMENT
} else {
$this->result = json_decode($response, true);

if ($response === false) {
$this->error = $request->getError();
}
$this
->checkCurlErrors($request)
->checkMyParcelErrors();
}

Expand All @@ -174,20 +176,6 @@ public function sendRequest($method = 'POST', $uri = self::REQUEST_TYPE_SHIPMENT
return $this;
}

/**
* Check if there are curl-errors
*
* @return $this
*/
private function checkCurlErrors($request)
{
if ($request->read() === false) {
$this->error = $request->getError();
}

return $this;
}

/**
* Check if MyParcel gives an error
*
Expand Down

0 comments on commit d56aed8

Please sign in to comment.