From: thomas dot ene at gmail dot com Operating system: Windows PHP version: 4.3.9 PHP Bug Type: Session related Bug description: Session and reference related
Description: ------------ Let's say I have a class c1. Doing this: $obj = &$_SESSION['obj']; $obj = &new c1(); would set $_SESSION['obj'] to NULL. Reproduce code: --------------- <?php class c1 { var $v; function c1($a) { $this->v = $a; } function say() { print "{$this->v}<br>"; } } session_start(); session_destroy(); $obj = &$_SESSION['aaa']; $obj = &new c1(6); var_dump($_SESSION['aaa']); ?> Expected result: ---------------- I would expect to have an object in the $_SESSION['aaa'] Actual result: -------------- The actual result is NULL. Sorry if this is post in not pertinent but I haven't found any support related to this. -- Edit bug report at http://bugs.php.net/?id=32869&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32869&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32869&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32869&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32869&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32869&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32869&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32869&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32869&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32869&r=support Expected behavior: http://bugs.php.net/fix.php?id=32869&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32869&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32869&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32869&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32869&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32869&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32869&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32869&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32869&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32869&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32869&r=mysqlcfg