Skip to content

Commit 7a44ae7

Browse files
committed
Add extra test to avoid warning about Countable in PHP 7.3
1 parent 7dd4671 commit 7a44ae7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Model/SimplePaginatedList.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ protected function onData($data)
5454
*/
5555
protected function isInitialized($data)
5656
{
57-
return count($data) === $this->totalRecordCount;
57+
if (is_countable($data)) {
58+
return count($data) === $this->totalRecordCount;
59+
}
60+
61+
return false;
5862
}
5963

6064
/**

0 commit comments

Comments
 (0)