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:
@@ -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);
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
|
||||
@@ -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===
|
||||
Reference in New Issue
Block a user