summaryrefslogtreecommitdiff
path: root/tests/lang/bug25922.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/bug25922.phpt')
-rw-r--r--tests/lang/bug25922.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/lang/bug25922.phpt b/tests/lang/bug25922.phpt
new file mode 100644
index 0000000..bb030c9
--- /dev/null
+++ b/tests/lang/bug25922.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #25922 (SEGV in error_handler when context is destroyed)
+--INI--
+error_reporting=2047
+--FILE--
+<?php
+function my_error_handler($error, $errmsg='', $errfile='', $errline=0, $errcontext='')
+{
+ echo "$errmsg\n";
+ $errcontext = '';
+}
+
+set_error_handler('my_error_handler');
+
+function test()
+{
+ echo "Undefined index here: '{$data['HTTP_HEADER']}'\n";
+}
+test();
+?>
+--EXPECT--
+Undefined variable: data
+Undefined index here: ''