Skip to content

Missing delimiter for preg_match pattern in UrlHelper::inArrayMatchesRegex #22248

@bayeriksen

Description

@bayeriksen

I got this errors in my log
preg_match(): Delimiter must not be alphanumeric or backslash in /core/UrlHelper.php:41
preg_match(): Delimiter must not be alphanumeric or backslash in /core/UrlHelper.php:46

Matomo version: 5.0.3
PHP version: 8.1.28

As I see the solution could be this lines insted
Line 41: if(@preg_match("/$val/", null) === false) {
Line 46: if( preg_match("/$val/", $test) === 1 ) {

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions