• Resolved Ov3rfly

    (@ov3rfly)


    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

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.