ID:               21690
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: windows
 PHP Version:      4.2.1
 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

see http://php.net/set_error_handler

[...]
Note:  The following error types cannot be handled with a user defined
function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING,
E_COMPILE_ERROR and E_COMPILE_WARNING.
[...]

"undefined function" is E_ERROR


Previous Comments:
------------------------------------------------------------------------

[2003-01-16 11:34:05] [EMAIL PROTECTED]

I read in the documentation, that the set_error_handler function helps
us to perform some actions when a critical error happens. I wrote an
error handler function named myFunction and set
set_error_handler("myFunction"), however it works only when a Notice or
a Warning occurs. When a fatal error happens (to call an undefined
function), the PHP error handler is executed:
------------------------------
<?php
function myFunction($a,$b,$c,$d){
switch($a){
 case 1: $a="Fatal error:";break;
 case 2: $a="Warning:";break;
 case 8: $a="Notice:";
}
echo "<b>$a</b> $b iniside <b>$c</b> on line<b> $d</b>";
}

set_error_handler("myFunction");
echo undef();
?>
------------------------------
The settings in the php.ini file:

; log errors = On  
; error_log = D:/inetpub/wwwroot/visit.txt
; error_log = syslog
; all three are disabled ... 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21690&edit=1

Reply via email to