Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated

Created on 5 January 2022, almost 3 years ago
Updated 23 June 2023, over 1 year ago

Problem/Motivation

PHP 8.1, Drupal 9.3, Webform 6.2.0-beta1 returns

Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\webform_ui\PathProcessor\WebformUiPathProcessor->processOutbound() (line 22 of modules/contrib/webform/modules/webform_ui/src/PathProcessor/WebformUiPathProcessor.php).

🐛 Bug report
Status

Fixed

Version

6.1

Component

Code

Created by

🇪🇸Spain bletch

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.

  • 🇨🇦Canada joseph.olstad

    Patch #16 is good, this is needed @jrockowitz

  • 🇨🇦Canada Nathan Tsai

    Getting dozens of:

    Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\webform_ui\PathProcessor\WebformUiPathProcessor->processOutbound() (line 22 of
    

    Just applied the patch and it appears to fix the issue.

    One question: should the check simply be falsey or something like !empty($path) or !is_null($path).

  • 🇨🇴Colombia camilo.escobar

    This was an issue until version 6.1.4, where the patch in #16 had to be applied. Updating to 6.1.5 will solve this problem and the patch will not be necessary, since the same issue was tackled with a different approach in https://www.drupal.org/project/webform/issues/3333461 📌 Still exist issues with strpos Deprecated function Fixed and https://www.drupal.org/project/webform/issues/3344996 📌 Fix PHP 8.1 deprecation Fixed .

Production build 0.71.5 2024