#41862 [Opn->Bgs]: Errorhandler doesn't work
ID: 41862
Updated by: johannes@php.net
Reported By: thomas at thoftware dot de
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows XP
PHP Version: 4.4.7
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
.
Previous Comments:
------------------------------------------------------------------------
[2007-06-30 21:29:30] thomas at thoftware dot de
Description:
------------
Setting an Errorhandler with set_error_handler() and then calling
require() with a Function as Argument doesn't produce the expected
Result.
Reproduce code:
---------------
function ehandler($e,$t,$f,$l,$c) {
echo $t;
}
function foo($foo) {
return($foo);
}
set_error_handler('ehandler');
error_reporting(E_ALL);
require_once(foo('foo'));
Expected result:
----------------
Some Errormessage like this:
main(foo) [function.main]: failed to open stream: No such file or
directory
Fatal error: main() [function.require]: Failed opening required 'foo'
(include_path='.;c:\php4\pear') in foo.php on line x
Actual result:
--------------
Nothing (infinite loop?). PHP crashes.
Using no Errorhandler or giving 'foo' directly to require_once() works.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41862&edit=1
Thread (9 messages)