summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/bug75539.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/tests/bug75539.phpt')
-rw-r--r--ext/pcre/tests/bug75539.phpt13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/pcre/tests/bug75539.phpt b/ext/pcre/tests/bug75539.phpt
new file mode 100644
index 0000000000..83f3ef7d6b
--- /dev/null
+++ b/ext/pcre/tests/bug75539.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #75539 - Recursive call errors are not reported by preg_last_error()
+--FILE--
+<?php
+
+var_dump(preg_match('/((?1)?z)/', ''));
+var_dump(preg_last_error() === \PREG_INTERNAL_ERROR);
+
+?>
+--EXPECTF--
+Warning: preg_match(): Compilation failed: recursive call could loop indefinitely at offset %s in %s on line %s
+bool(false)
+bool(true) \ No newline at end of file