From:             [EMAIL PROTECTED]
Operating system: windows
PHP version:      4.2.1
PHP Bug Type:     Unknown/Other Function
Bug description:  error handling

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 bug report at http://bugs.php.net/?id=21690&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21690&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21690&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21690&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21690&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21690&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21690&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21690&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21690&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21690&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21690&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21690&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21690&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21690&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=21690&r=gnused

Reply via email to