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 downloaded this: http://snaps.php.net/win32/php4-win32-latest.zip

And it still doesnt work.
<?
class Test{
        function ErrorHandler($a,$b){
                print("Error Handled");
        }
}
$error=new Test();
print("AA".$fafa);
set_error_handler('$error->ErrorHandler');
print("AA".$fafa);
?>

This bug should be probably reopened


Previous Comments:
------------------------------------------------------------------------

[2002-10-10 05:50:03] [EMAIL PROTECTED]

In CVS, development snapshot is available at
http://snaps.php.net/php4-latest.tar.bz2

>From the ChangeLog:
2002-06-12  Andrei Zmievski  <[EMAIL PROTECTED]>

    * NEWS:
    set_error_handler() should take methods as callbacks. Also fixed it
to report
    invalid callbacks.

------------------------------------------------------------------------

[2002-10-10 04:20:42] [EMAIL PROTECTED]

I downloaded Yesterdays "laststable" version, and bug is still in. When
it was fixed?

------------------------------------------------------------------------

[2002-10-10 02:57:17] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

[2002-10-09 13:22:53] [EMAIL PROTECTED]

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

------------------------------------------------------------------------

[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.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/19033

-- 
Edit this bug report at http://bugs.php.net/?id=19033&edit=1

Reply via email to