php-src/tests/lang/bug25922.phpt
2020-03-31 13:02:32 +02:00

25 lines
495 B
PHP

--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
Trying to access array offset on value of type null
Undefined index here: ''