close
0

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in

avatar
asked 14-09-2021

2 Answers


3

You must defined variable with array() before use it. or

if (is_countable($aa) && count($aa) > 0) :
avatar
answered 15-09-2021

0

On PHP8.0 compulsory types are define on Count.

count(array($XYZVariable));
avatar
answered 15-09-2021