From:             auroraeosrose at hotmail dot com
Operating system: Win XP Pro SP2
PHP version:      5CVS-2004-09-25 (dev)
PHP Bug Type:     Zend Engine 2 problem
Bug description:  exception handler not working with objects

Description:
------------
this is the 5.0 cvs snapshots NOT the 5.1 cvs snapshots

set_exception_handler(array($object, 'method')); or even
set_exception_handler(array('Class', 'method')); does not work, setting
just a function does set_exception_handler('function);

Reproduce code:
---------------
class dog {
function bug($exception)
{
        var_dump($exception);
}
}
$dog = new dog();
set_exception_handler(array($dog, 'bug'));
throw new Exception('doggy');

Expected result:
----------------
Fatal error: Uncaught exception 'Exception' with message 'doggy' in
[removed]:10 Stack trace: #0 {main} thrown in [removed] on line 10

Actual result:
--------------
object(Exception)#1 (6) {
  ["message:protected"]=>
  string(5) "doggy"
  ["string:private"]=>
  string(0) ""
  ["code:protected"]=>
  int(0)
  ["file:protected"]=>
  string(45) "[removed]"
  ["line:protected"]=>
  int(8)
  ["trace:private"]=>
  array(0) {
  }
}

-- 
Edit bug report at http://bugs.php.net/?id=30230&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30230&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30230&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30230&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30230&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30230&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30230&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30230&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30230&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30230&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30230&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30230&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30230&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30230&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30230&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30230&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30230&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30230&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30230&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30230&r=mysqlcfg

Reply via email to