Skip to content

Commit af7dbb2

Browse files
committed
Rendering Error in layout User/Item: count(): Argument #1 ($value) must
be of type Countable|array, int given in .../Model/TopicsModel.php on line 657
1 parent f232018 commit af7dbb2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/site/src/Model/TopicsModel.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -654,11 +654,11 @@ protected function populateState($ordering = null, $direction = null)
654654
$latestCategory = $klatestCategory;
655655
} elseif ($latestCategoryIn && !$klatestContext) {
656656
// Check if it selected show all, else show only the category(ies) selected in the list are showed
657-
if (count($latestCategory) == 1) {
658-
if ($latestCategory[0] == 0) {
659-
$latestCategory = false;
660-
} else {
661-
$latestCategory = $latestCategory;
657+
if (is_array($latestCategory)) {
658+
if (count($latestCategory) == 1) {
659+
if ($latestCategory[0] == 0) {
660+
$latestCategory = false;
661+
}
662662
}
663663
}
664664

0 commit comments

Comments
 (0)