[ad_1]
Getting these entries in debug.log
[03-Oct-2024 11:43:43 UTC] PHP Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in .../wp-content/plugins/newsletter/includes/module-base.php on line 964
This is the code:
963: static function sanitize_gender($gender) {
964: $gender = trim(strtolower($gender));
965: if (empty($gender)) {
966: return 'n';
967: }
Seems the problem is caused when no gender is used so $gender
is null
before this function call.
Suggested fix: Check for null
in function before using strtolower()
and trim()
.
Newsletter 8.5.2, WordPress 6.3.5, PHP 8.1.x