ID: 22472 User updated by: nightik at intech dot ru Reported By: nightik at intech dot ru Status: Bogus Bug Type: *General Issues Operating System: Windows 2000 Advanced Server PHP Version: 4.3.0 New Comment:
I need track errors in the constructor and in the functions that called in the construcor. Previous Comments: ------------------------------------------------------------------------ [2003-03-04 20:04:28] [EMAIL PROTECTED] Don't trigger errors in the constructor. ------------------------------------------------------------------------ [2003-03-01 02:57:37] nightik at intech dot ru If use E_USER_WARNING, E_USER_ERROR, E_USER_NOTICE this problem stay. ------------------------------------------------------------------------ [2003-02-28 11:06:57] [EMAIL PROTECTED] You should be using E_USER_WARNING not E_WARNING. Once I make this change I am unable to replicate the error you are seeing. ------------------------------------------------------------------------ [2003-02-28 04:04:35] nightik at intech dot ru There is bug ---- example.php ---- <?php class example { function example() { set_error_handler(array(&$this, "_error_handler")); // do somthing generate... trigger_error("Error", E_WARNING); } function _error_handler($errno, $errstr, $errfile, $errline) { echo "<b>$errno</b>: $errstr in $errfile in line $errline <br>"; } } $class = new example(); ?> Some times this script outputs: ------- Warning: Error in z:\home\lego\www\test_err.php on line 8 ------- but some times outputs: ------- 512: Error in z:\home\lego\www\test_err.php in line 8 ------- So, some times system error handler works, but enother times method _error_handler from example class works. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22472&edit=1