Skip to content

Commit 344dd83

Browse files
authored
Catch error not being set on response data array
1 parent b0dea2b commit 344dd83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Provider/Xero.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ protected function checkResponse(ResponseInterface $response, $data)
130130
{
131131
if ($response->getStatusCode() >= 400) {
132132
throw new XeroProviderException(
133-
$data['error'] ?: $response->getReasonPhrase(),
133+
isset($data['error']) ? $data['error'] : $response->getReasonPhrase(),
134134
$response->getStatusCode(),
135135
$response
136136
);

0 commit comments

Comments
 (0)