Commit 5f32a34f authored by Victor Yang's avatar Victor Yang 🏀 Committed by Jakob P
Browse files

Issue #3298766 by cobenash, japerry: php8.1 deprecation warning function:...

Issue #3298766 by cobenash, japerry: php8.1 deprecation warning function: trim(): Passing null to parameter #1
parent 483455eb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -724,7 +724,10 @@ function captcha_whitelist_ips_parse_values($whitelist_ips_value) {
    CAPTCHA_WHITELIST_IP_ADDRESS => [],
  ];

  if (empty(trim($whitelist_ips_value))) {
  // Ensure the IPs value is trimmed before moving onward.
  $whitelist_ips_value = trim($whitelist_ips_value ?? "");

  if (empty($whitelist_ips_value)) {
    return $whitelist_ips;
  }