Replace str_contains() with strpos()

Created on 24 October 2022, about 2 years ago
Updated 13 June 2023, over 1 year ago

Problem/Motivation

On a project that requires php7.4, entity_list 2.x causes PHP errors due to some mixed parameters types in taxonomy filters.

Steps to reproduce

  • Install Drupal on a 7.4 php environment
  • Create a list with a taxonomy term based filter
  • Attempt to filter

Proposed resolution

Attached patch with rector (DowngradeLevelSetList::DOWN_TO_PHP_74 set list) fixes. Removes mixed typehint & replace str_contains with str_pos. Maybe not a high priority, as PHP 7.x security supports ends next november 28th though.

📌 Task
Status

Fixed

Version

2.1

Component

Code

Created by

🇫🇷France jmaxant

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