ID: 19033 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: Program Execution Operating System: linux 2.4.18 PHP Version: 4.2.1 New Comment:
I still recive this bug. I'm unable to do this: $old=set_error_handler(array($error, "ErrorHandler")); (from outside the class) or this: $old=set_error_handler(array($this, "ErrorHandler")); (from inside) I'm using PHP 4.2.3 for Windows Previous Comments: ------------------------------------------------------------------------ [2002-08-26 19:14:10] [EMAIL PROTECTED] Please provide an example and PHP version you are using. I am on 4.2.1 and have tried every conceivable combinations of object/method and none work. $error = new ErrorHandler(); Ex: $old=set_error_handler(array(&$error, "error_handler_method")); and vice versa only returns false. The method indicated has been tested outside of a class and works perfectly. ------------------------------------------------------------------------ [2002-08-22 08:35:38] [EMAIL PROTECTED] Works fine for me. You have to supply an array containing an object reference and a method name. I've added a note about this to the manual. ------------------------------------------------------------------------ [2002-08-22 03:23:09] [EMAIL PROTECTED] set_error_handler should accept a method/object pair for OO error handling. Bug 9155 had the same thing. It said it was fixed (sometimes mid-2001) However it does not seem to work and the code does not appear to me to accept a object/method pair Joshua ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19033&edit=1