mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
add test
This commit is contained in:
parent
9e9c193e1b
commit
11ae876f34
21
Zend/tests/bug30998.phpt
Executable file
21
Zend/tests/bug30998.phpt
Executable file
@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #30998 (Crash when user error handler returns false)
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(-1);
|
||||
|
||||
function my_error($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
print "$errstr ($errno) in $errfile:$errline\n";
|
||||
return false;
|
||||
}
|
||||
set_error_handler('my_error');
|
||||
|
||||
$f = fopen("/tmp/blah", "r");
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
fopen(/tmp/blah): failed to open stream: No such file or directory (2) in %s:%d
|
||||
|
||||
Warning: fopen(/tmp/blah): failed to open stream: No such file or directory in %s on line %d
|
||||
===DONE===
|
Loading…
Reference in New Issue
Block a user