Skip to content

Commit

Permalink
Allow null responses
Browse files Browse the repository at this point in the history
  • Loading branch information
ngmy committed Jul 17, 2023
1 parent cac6689 commit 7daf848
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ResponseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ class ResponseFactory
*/
public static function create(array $response): ResponseContract
{
if (isset($response['exception'])) {
if (\array_key_exists('exception', $response)) {
return new ExceptionResponse($response['exception']);
}

if (isset($response['response'])) {
if (\array_key_exists('response', $response)) {
return new Response($response['response']);
}

Expand Down

0 comments on commit 7daf848

Please sign in to comment.