Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

J 4.0 "lazy-loading" with php7-4 causes warning #30647

Closed
schultz-it-solutions opened this issue Sep 15, 2020 · 1 comment
Closed

J 4.0 "lazy-loading" with php7-4 causes warning #30647

schultz-it-solutions opened this issue Sep 15, 2020 · 1 comment

Comments

@schultz-it-solutions
Copy link
Contributor

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)
@SharkyKZ
Copy link
Contributor

Duplicate issue #30615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants