Skip to content

[fix] htmlspecialchars(): Passing null to parameter is deprecated#1256

Merged
mrflos merged 1 commit intoYesWiki:doryphore-devfrom
zamentur:patch-1
Mar 3, 2025
Merged

[fix] htmlspecialchars(): Passing null to parameter is deprecated#1256
mrflos merged 1 commit intoYesWiki:doryphore-devfrom
zamentur:patch-1

Conversation

@zamentur
Copy link
Contributor

@zamentur zamentur commented Mar 3, 2025

Description of pull request / Description de la demande d'ajout

I had this error due to an image without alt text on a php8.3 setup:

Warning: Undefined array key 3 in /var/www/html/formatters/wakka.php on line 420

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/formatters/wakka.php on line 420

With this in the template

![](https://www.chatons.org//sites/default/files/uploads/engrenage_jaune.svg)

Sometimes it's legitimate to have no alt text configured (for some icons with a label for example) or image decorative with no need of description.

This PR fix this deprecated message.

@mrflos mrflos merged commit cf97b32 into YesWiki:doryphore-dev Mar 3, 2025
@mrflos
Copy link
Contributor

mrflos commented Mar 3, 2025

okay, thanks @ljf !

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants