Skip to content

Commit

Permalink
Merge pull request #2 from NaxYo/patch-1
Browse files Browse the repository at this point in the history
Avoiding crash on access denied
  • Loading branch information
patrickbussmann authored Jan 21, 2020
2 parents 74c6f60 + 9607909 commit 519e679
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Provider/Apple.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ protected function checkResponse(ResponseInterface $response, $data)
{
if ($response->getStatusCode() >= 400) {
throw new AppleAccessDeniedException(
$data['error'] ?: $response->getReasonPhrase(),
$data['code'] ?: $response->getStatusCode(),
array_key_exists('error', $data) ? $data['error'] : $response->getReasonPhrase(),
array_key_exists('code', $data) ? $data['code'] : $response->getStatusCode(),
$response
);
}
Expand Down

0 comments on commit 519e679

Please sign in to comment.