Files
Twig/tests/Fixtures/expressions/matches_error_execution.test
2026-08-28 08:41:42 +02:00

9 lines
348 B
Plaintext

--TEST--
Twig reports PCRE execution failures for the "matches" operator
--TEMPLATE--
{{ subject matches regexp }}
--DATA--
return ['subject' => 'aX', 'regexp' => '~(*LIMIT_MATCH=1)^(a+)+$~'];
--EXCEPTION--
Twig\Error\RuntimeError: Regexp "~(*LIMIT_MATCH=1)^(a+)+$~" passed to "matches" failed: Backtrack limit exhausted in "index.twig" at line 2.