]> granicus.if.org Git - php/commitdiff
Add regression test for bug #68175
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 18 Aug 2018 12:26:02 +0000 (14:26 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 18 Aug 2018 12:36:16 +0000 (14:36 +0200)
NEWS
ext/spl/tests/bug68175.phpt [new file with mode: 0644]

diff --git a/NEWS b/NEWS
index a3d9ea1e799d9ce33181205f984e2c2d934392ca..cc8db6cf5bf45c995eba1ca6fa310bca09e34d0b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,10 @@ PHP                                                                        NEWS
   . Fixed bug #76595 (phpdbg man page contains outdated information).
     (Kevin Abel)
 
+- SPL:
+  . Fixed bug #68175 (RegexIterator pregFlags are NULL instead of 0). (Tim
+    Siebels)
+
 - zlib:
   . Fixed bug #65988 (Zlib version check fails when an include/zlib/ style dir
     is passed to the --with-zlib configure option). (Jay Bonci)
diff --git a/ext/spl/tests/bug68175.phpt b/ext/spl/tests/bug68175.phpt
new file mode 100644 (file)
index 0000000..bba769b
--- /dev/null
@@ -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===