Skip to content

Tracking request may trigger a warning when providing an invalid regex #16153

@tsteur

Description

@tsteur

For example to reproduce create dimension in action scope using below regex:

[{"dimension":"url","pattern":"/abcdefghijkl(*)/"}]

See https://3v4l.org/8ENBl trigggers a warning in the logs:

PHP Warning: preg_match(): Compilation failed: nothing to repeat at offset 15 in plugins/CustomDimensions/Dimension/Extraction.php on line 117

Ideally, in all plugins where it is possible to define a regex, we validate that the regex is at "valid". For example Goals etc. This will increase the correctness of the tracked data.

If the regex is not valid, then an error should be shown.

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.c: Custom DimensionsFor issues related to the Custom Dimensions plugin.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions