Problem htmlspecialchars in mod_osmod/mod_osmod.php with PHP 8.1
With PHP 8.1 i got the following error using the module: Error message: Deprecated: htmlspecialchars(): Passing null to parameter #1 (closed) ($string) of type string is deprecated in /webserver_path/modules/mod_osmod/mod_osmod.php on line 22
22: moduleclass_sfx = htmlspecialchars(params->get('moduleclass_sfx'));
I have added the following code in my Joomla instance to fix it (in my use case): if($params->get('moduleclass_sfx') == null) $moduleclass_sfx = null; else $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));
I am not sure if this fix is good code, so I have not started to try to add the code to the GIT repo. Maybe somebody can take do a review or contact me to help to add a merge request if my solution is stabile and good idea.
BR, Claus