PHP 8.1 compatibility: preg_split

Created on 27 January 2023, almost 2 years ago
Updated 13 September 2023, over 1 year ago

Problem/Motivation

I've seen a handful of deprecation issues around here marked as closed/fixed, yet I'm still seeing deprecation warnings:

Deprecated function: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in Drupal\webform\Plugin\WebformElementBase->prepare() (line 731 of modules/contrib/webform/src/Plugin/WebformElementBase.php).

Steps to reproduce

I'm running this on my local using Lando for the containers.
All debug stuff is enabled on local.
Create a webform, view webform, see error.

Deprecated function: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in Drupal\webform\Plugin\WebformElementBase->prepare() (line 731 of modules/contrib/webform/src/Plugin/WebformElementBase.php).
Drupal\webform\Plugin\WebformElementBase->prepare(Array, Object) (Line: 49)
Drupal\webform\Plugin\WebformElement\TextBase->prepare(Array, Object) (Line: 46)
Drupal\webform\Plugin\WebformElement\TextField->prepare(Array, Object) (Line: 173)
etc...

Proposed resolution

Let's knock these out. Patch forthcoming for this one.

Remaining tasks

Find all of these. :D

πŸ› Bug report
Status

Closed: cannot reproduce

Version

6.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States seanr

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

Comments & Activities

Production build 0.71.5 2024