1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 15:38:49 +02:00

Merge branch 'PHP-7.3'

* PHP-7.3:
  Add regression test for bug #68175
  Fix #68175: RegexIterator pregFlags are NULL instead of 0
This commit is contained in:
Christoph M. Becker
2018-08-18 14:39:35 +02:00
2 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -2202,7 +2202,7 @@ SPL_METHOD(RegexIterator, getPregFlags)
if (intern->u.regex.use_flags) {
RETURN_LONG(intern->u.regex.preg_flags);
} else {
return;
RETURN_LONG(0);
}
} /* }}} */
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #68175 (RegexIterator pregFlags are NULL instead of 0)
--FILE--
<?php
$arr = new ArrayIterator(array());
$regex = new RegexIterator($arr, '/^test/');
var_dump(
$regex->getMode(),
$regex->getFlags(),
$regex->getPregFlags()
);
?>
===DONE===
--EXPECT--
int(0)
int(0)
int(0)
===DONE===