Deprecated function: preg_replace()

Created on 15 September 2024, 3 days ago
Updated 16 September 2024, 3 days ago

Problem/Motivation

Deprecated function: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in Drupal\form_mode_manager\FormModeManager->getFormModeMachineName() (line 265 of modules/contrib/form_mode_manager/src/FormModeManager.php).

Steps to reproduce

I have this error after going to node/*/edit

Drupal:10.3.2
PHP: 8.2.23

Proposed resolution

I think this line fixes this issue :

    return preg_replace('/^.*\./', '', $form_mode_id ?? '');
πŸ› Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡ΈπŸ‡¦Saudi Arabia abdulaziz zaid Riyadh

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

Comments & Activities

Production build 0.71.5 2024