Steps to reproduce the issue
While debugging, I stumbled across this known bug and disabled caching for the affected mod_articles_categories, which was followed by a deprecated message that can be reproduced as follows.
- Joomla 4.2.3
- PHP 8.1
- Joomla configuration: Activate progressive caching (see image below).
- !!Clear Joomla Cache!!
- Frontend: Open a page with modules where caching is not disabled (don't know if that matters).
- With hardly configured n3t debug plugin I get
Deprecated: Automatic conversion of false to array is deprecated
File: libraries/src/Document/HtmlDocument.php:561
See also images.
$cbuffer
can only be boolean false if the call to$cache->get
in line 545 returns false, which is the case when caching is switched off, but then we should not be in that branch of the if statement.A bit below that line, in line 548 the method returns when
$cbuffer[$hash]
is set.So it seems that after that line we can assume that the
$cbuffer
was not properly set.If my assumption is true, it is maybe sufficient and correct just to add a line
$cbuffer = [];
(or$cbuffer = array();
if keeping the old array syntax like elsewhere in that file) before line 561.@Fedik What do you think? Can it be solved like this?