explode(): Passing null to parameter #2 ($string) of type string is deprecated in _cleantalk_form_alter()

Created on 5 October 2022, about 2 years ago
Updated 11 December 2023, 12 months ago

After a recent update to PHP 8.1 using D9.4.7 one of the sites I was working on threw a deprecation error:

Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in _cleantalk_form_alter() (line 386 of modules/contrib/cleantalk/cleantalk.module).

$url_exclusion = explode(",",\Drupal::config('cleantalk.settings')->get('cleantalk_url_exclusions'));

I created a patch for the issue locally to bypass the issue, adding this in case anybody else has the issue.

🐛 Bug report
Status

Fixed

Version

9.1

Component

Code

Created by

🇬🇧United Kingdom g.weston

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024