Skip to content

Commit b5a60a8

Browse files
authored
Merge pull request #76 from barthicus/fix-issue-75
Add empty array check before function count() call
2 parents 1c1dbc5 + af6a8fd commit b5a60a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Action/FetchAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(
5050
*/
5151
protected function throwErrorOnNoResults($results, $message)
5252
{
53-
if (! $results || count($results) === 0) {
53+
if (! $results || (is_array($results) && count($results) === 0)) {
5454
throw new ApiInvalidRequestException(
5555
$message
5656
);

0 commit comments

Comments
 (0)