Hello again,
I have now tested your example, @notrinos, and it doesn't work as intended.
I have now changed the function count_array($array) in /includes/ui/ui_globals.inc to this:
function count_array($array)
{
return (is_array($array)) ? count($array) : (($array === NULL) ? 0 : 1);
}and it works for PHP versions 7.2.12, 7.1.9, 7.0.23, 5.6.31, 5.5.25 and 5.4.10.
It gives the same return as the old count() without errors or warnings.
We only have to convert more counts() if we detect more errors. We can wait until next major to do this.
This has now been committed and a new file can be downloaded here:
/Joe.
