Warning strpos() Empty needle

Created on 27 April 2022, about 2 years ago
Updated 3 January 2024, 6 months ago

Problem/Motivation

Drupal Version: 9.3.9 PHP:7.3
/*|all-page

Warning: strpos(): Empty needle in page_specific_class_preprocess_html() (line 43 of modules/~theming/page_specific_class/page_specific_class.module).

Proposed resolution

        // Check wildcard.
        if (strpos($url, '*') !== FALSE) {
/*WT-patch*/
          /*$path = str_replace('/*', '', $url);
          $path = str_replace('*', '', $path);
          if (strpos($alias_path, $path) === 0) {*/
          $path = str_replace(['/*', '*'], '', $url);
          if ($path == '' || strpos($alias_path, $path) === 0) {
/*<<<*/
            $passWildCard = TRUE;
🐛 Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇮🇱Israel Promo-IL

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.69.0 2024