Hi,
Since php 7.2 the count of a non-countable object fails.
See https://wiki.php.net/rfc/counting_non_countables
and http://php.net/manual/en/function.count.php
This function row_array:
https://github.com/bcit-ci/CodeIgniter/blob/c243df3af851fe90cd272f3958f7eb7bf76173b1/system/database/DB_result.php#L431
returns null when count of the result equals null, but the @return states it should return an array. I think this function should return the array like the phpdoc states as to make it compatible with php7.2. Example can be found in
There's nothing incompatible or wrong with the function and it won't be changed.
It's the phpdoc annotation that's inaccurate, and there's many more instances of that throughout the entire framework. We simply don't treat those as code, but as inline documentation.