mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
In the latest version of libpcre2, the offsets appearing in some "compilation failed" warnings have increased by one, as a result of https://github.com/PCRE2Project/pcre2/pull/756 This is causing spurious test failures, so in this commit we replace the hard-coded offsets by a regex that matches both values. Gentoo-bug: https://bugs.gentoo.org/965018 Closes GH-20397
16 lines
448 B
PHP
16 lines
448 B
PHP
--TEST--
|
|
X (PCRE_EXTRA) modifier is ignored (no error, no change)
|
|
--FILE--
|
|
<?php
|
|
|
|
var_dump(preg_match('/\y/', '\y'));
|
|
var_dump(preg_match('/\y/X', '\y'));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: preg_match(): Compilation failed: unrecognized character follows \ at offset %r(1|2)%r in %spcre_extra.php on line 3
|
|
bool(false)
|
|
|
|
Warning: preg_match(): Compilation failed: unrecognized character follows \ at offset %r(1|2)%r in %spcre_extra.php on line 4
|
|
bool(false)
|