PHP 8.1 deprecates passing NULL to strpos

Created on 26 January 2023, almost 2 years ago
Updated 11 October 2023, about 1 year ago

Problem/Motivation

When using Panelizer, the following runtime error is appearing: Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in PanelizerEntityDefault->get_default_panelizer_object() (line 2876 of panelizer/plugins/entity/PanelizerEntityDefault.class.php).

Steps to reproduce

This happening on every page load of a panelized node on a Panopoly child distribution; not sure of exact steps.

Proposed resolution

Use an empty string instead of leaving the variable undefined.

Remaining tasks

Patch and test.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cboyden

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

Comments & Activities

Production build 0.71.5 2024