|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-03-04 19:42 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 13:00:01 2025 UTC |
I have some problems with set_error_handler as in the following code: <?php error_reporting(E_ALL); class Error { function Error() { set_error_handler(array($this, 'handleError')); } function handleError($type, $desc) { print 'Error ' . $type . ' : ' . $desc . '<br>'; } } function passtru($type, $desc) { $GLOBALS['eh']->handleError($type, $desc); } $eh =& new Error(); // *** it will work if use the following line // set_error_handler('passtru'); print $undefined; trigger_error('Error triggered', E_USER_ERROR); ?> It seems that set_error_handler accepts an object/method tuple but does not call it. PHP 4.3.1 as CGI (4.3.0 also has this problem) Windows 98SE Apache 1.3.27 (Win32)