PHP 8.1 - Deprecated function: strpos() in tokenizeValue()

Created on 6 March 2024, 10 months ago
Updated 31 August 2024, 4 months ago

Problem/Motivation

This warning started to appear after changing php version to PHP 8.1
Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\views\Plugin\views\style\StylePluginBase->tokenizeValue() (line 231 of core/modules/views/src/Plugin/views/style/StylePluginBase.php).

Proposed resolution

Replacing the strpos function with str_contains.

πŸ› Bug report
Status

Closed: works as designed

Version

9.5

Component
ViewsΒ  β†’

Last updated 29 minutes ago

Created by

πŸ‡―πŸ‡΄Jordan odai jbr

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

Comments & Activities

  • Issue created by @odai jbr
  • Status changed to Postponed: needs info 10 months ago
  • Drupal 9 is unsupported. Please verify on a supported release.

  • πŸ‡¦πŸ‡ΊAustralia pameeela

    As already noted, Drupal 9 is no longer supported. If this issue can be reproduced in Drupal 10 or 11, please update the issue with steps to reproduce.

    If more information is not provided within the next three months, this issue will be closed. Or if it cannot be reproduced outside of version 9, it will also be closed.

  • Status changed to Closed: works as designed 4 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    Since we need more information to move forward with this issue, and it has not been supplied and Drupal 9 is EOL. I am closing this issue.

    If you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', updating the Version and and providing complete steps to reproduce the issue β†’ (starting from "Install Drupal core").

    Thanks!

Production build 0.71.5 2024