thirtybees / collectlogs

Collect Error Logs module
0 stars 1 forks source link

PHP 8.2 compatibility #8

Closed e-com-presta closed 1 year ago

e-com-presta commented 1 year ago

Message: explode(): Passing null to parameter #2 ($string) of type string is deprecated Location: modules/collectlogs/classes/Settings.php line 192

getdatakick commented 1 year ago

Method Settings::setEmailAddresses now ensures that entry in tb_configuration table contains either valid string, or does not exists at all. Therefore, null value should never be stored in tb_configuration table for COLLECTLOGS_NEW_ERRORS_EMAIL configuration key.

However, previous version of module did not do this check, so in some cases null can actually be stored inside db table. Hence this issue.

There is very simple workaround -- simply resave module settings.