?
avatar schultz-it-solutions
schultz-it-solutions
15 Sep 2020

Steps to reproduce the issue

The "lazy-loading" method "image" (defined in .../libraries/src/HTML/HTMLHelper.php ) creates PHP warnings, when images are loaded without the $attribs

I belief, the reason is that $attribs is set to NULL, if not provided in the method-call, and adding an array-element "loading" to a NULL value causes this warning (in PHP 7.4).

Expected result

no PHP warning

Actual result

Warning: Illegal string offset 'loading' in .../libraries/src/HTML/HTMLHelper.php on line 693

System information (as much as possible)

PHP 7.4.9
Joomla! 4.0.0-beta4-dev Development [ MaƱana ] 29-July-2020 18:21 GMT

Additional comments

method definition in .../libraries/src/HTML/HTMLHelper.php

public static function image($file, $alt, $attribs = null, $relative = false, $returnPath = 0)
avatar schultz-it-solutions schultz-it-solutions - open - 15 Sep 2020
avatar joomla-cms-bot joomla-cms-bot - change - 15 Sep 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Sep 2020
avatar SharkyKZ SharkyKZ - change - 15 Sep 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-09-15 13:25:30
Closed_By SharkyKZ
avatar SharkyKZ SharkyKZ - close - 15 Sep 2020
avatar SharkyKZ
SharkyKZ - comment - 15 Sep 2020

Duplicate issue #30615

Add a Comment

Login with GitHub to post a comment