summaryrefslogtreecommitdiff
path: root/Zend/tests/bug30998.phpt
blob: 2ff3068e5ca348ef7202986c4c22a2369486270d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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: %s (2) in %s:%d

Warning: fopen(/tmp/blah): failed to open stream: %s in %s on line %d
===DONE===