No Code Attached Yet
avatar elpescador-nl
elpescador-nl
9 Jan 2022

Steps to reproduce the issue

Add a banner module without header/footer text

Expected result

No deprecation warning

Actual result

A deprecation warning:

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /path/to/joomla4/modules/mod_banners/mod_banners.php on line 16

System information (as much as possible)

Joomla! 4.0.5
php 8.1.1

avatar elpescador-nl elpescador-nl - open - 9 Jan 2022
avatar joomla-cms-bot joomla-cms-bot - change - 9 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Jan 2022
avatar elpescador-nl
elpescador-nl - comment - 9 Jan 2022

This:

$headerText = trim($params->get('header_text'));
$footerText = trim($params->get('footer_text'));

Replaced by this, might be the simplest solution:

 $headerText = trim($params->get('header_text', '')); 
 $footerText = trim($params->get('footer_text', ''));
avatar PhilETaylor
PhilETaylor - comment - 10 Jan 2022
avatar alikon alikon - change - 10 Jan 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-01-10 07:13:24
Closed_By alikon
avatar alikon alikon - close - 10 Jan 2022
avatar alikon
alikon - comment - 10 Jan 2022

please test #36625

Add a Comment

Login with GitHub to post a comment