#22535 [NEW]: set_error_handler does not call object/method tuple

From: Date: Tue, 04 Mar 2003 12:35:09 +0000
Subject: #22535 [NEW]: set_error_handler does not call object/method tuple
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-34752@lists.php.net to get a copy of this message
From: thixit at yahoo dot com Operating system: Windows 98SE PHP version: 4.3.1 PHP Bug Type: Scripting Engine problem Bug description: set_error_handler does not call object/method tuple 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) -- Edit bug report at http://bugs.php.net/?id=22535&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22535&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22535&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22535&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22535&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22535&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22535&r=support Expected behavior: http://bugs.php.net/fix.php?id=22535&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22535&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22535&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22535&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22535&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22535&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22535&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22535&r=gnused

« previous php.bugs (#34752) next »