Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #77827: preg_match does not ignore \r in regex flags
This commit is contained in:
Christoph M. Becker 2019-03-31 13:32:31 +02:00
commit d8b7728b0e
3 changed files with 19 additions and 0 deletions

4
NEWS
View file

@ -14,6 +14,10 @@ PHP NEWS
. Fixed bug #77773 (Unbuffered queries leak memory - MySQLi / mysqlnd).
(Nikita)
- PCRE:
. Fixed bug #77827 (preg_match does not ignore \r in regex flags). (requinix,
cmb)
- phpdbg:
. Fixed bug #76801 (too many open files). (alekitto)
. Fixed bug #77800 (phpdbg segfaults on listing some conditional breakpoints).

View file

@ -695,6 +695,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex)
case ' ':
case '\n':
case '\r':
break;
default:

View file

@ -0,0 +1,14 @@
--TEST--
Bug #77827 (preg_match does not ignore \r in regex flags)
--FILE--
<?php
var_dump(
preg_match("/foo/i\r", 'FOO'),
preg_last_error()
);
?>
===DONE===
--EXPECT--
int(1)
int(0)
===DONE===