ThemeInitialization.php / resolveStyleSheetPlaceholders: duplicates in or false character class

Created on 24 July 2023, over 1 year ago
Updated 19 June 2024, 6 months ago

Problem/Motivation

The character class "[A-z0-9_-]" contains duplicates or is a spelling mistake.
[A-z] = A-Z, [, \, ], ^, _, ', a-z (ASCII 65-122).

Steps to reproduce

File: core/lib/Drupal/Core/Theme/ThemeInitialization.php

line: 286
if (!preg_match('/@[A-z0-9_-]+/', $token_candidate)) {

Proposed resolution

If it is a spelling mistake:

line: 286
if (!preg_match('/@[A-Z0-9_-]+/', $token_candidate)) {
or
if (!preg_match('/@[A-Za-z0-9_-]+/', $token_candidate)) {

Remaining tasks

no

User interface changes

no

API changes

no

Data model changes

no

Release notes snippet

🐛 Bug report
Status

Closed: duplicate

Version

11.0 🔥

Component
Theme 

Last updated 9 minutes ago

Created by

🇩🇪Germany fnalb2

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024