Skip to content

Commit 544c164

Browse files
ondrakubdg
authored andcommitted
fixed PHP 7.2 compatibility (#190)
* fixed Warning: count(): Parameter must be an array or an object that implements Countable
1 parent 06dc44d commit 544c164

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/Table/GroupedSelection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ protected function execute(): void
158158
foreach ((array) $this->rows as $key => $row) {
159159
$ref = &$data[$row[$this->column]];
160160
$skip = &$offset[$row[$this->column]];
161-
if ($limit === null || $rows <= 1 || (count($ref) < $limit && $skip >= $this->sqlBuilder->getOffset())) {
161+
if ($limit === null || $rows <= 1 || (count($ref ?? []) < $limit && $skip >= $this->sqlBuilder->getOffset())) {
162162
$ref[$key] = $row;
163163
} else {
164164
unset($this->rows[$key]);

0 commit comments

Comments
 (0)