When there are no items in the specified block name the following is produced:
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/template/context.php on line 289: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/template/context.php on line 301: Invalid argument supplied for foreach()
Ran into this while doing a custom extension that deals with the navlinks and happens on the index page where there are no navlinks. This is the code:
$navlinks = $this->template->retrieve_block_vars('navlinks', array());
If I DO specify the variable name I'm looking for the error list gets reduced to just the first one.