Skip to content

Commit

Permalink
Merge pull request #3 from morphsites-limited/master
Browse files Browse the repository at this point in the history
Catch error not being set on response data array
  • Loading branch information
calcinai authored Feb 19, 2020
2 parents b0dea2b + 344dd83 commit 50e450b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Provider/Xero.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ protected function checkResponse(ResponseInterface $response, $data)
{
if ($response->getStatusCode() >= 400) {
throw new XeroProviderException(
$data['error'] ?: $response->getReasonPhrase(),
isset($data['error']) ? $data['error'] : $response->getReasonPhrase(),
$response->getStatusCode(),
$response
);
Expand Down

0 comments on commit 50e450b

Please sign in to comment.