From: [EMAIL PROTECTED] Operating system: linux PHP version: 4.1.1 PHP Bug Type: Session related Bug description: when use object method call session register doesn't work
Following code the shows strange bag. When function t() called as object method, variable 'time' is not kept in session. Register_globals is On. <?php session_start(); class Test { var $mT = array(); // this function does not deal with session function t() { reset($GLOBALS); while (list($k,$v)=each($GLOBALS)) $GLOB[$k]=$v; $this->mT['TEST'] = $GLOB; } } $test = new Test; $test->t(); // comment this line and script will work right ?> <pre> <?php print_r($_SESSION); $_SESSION['time'] = time(); session_register('time'); echo "\n-------new _SESSION:-----------\n\n"; print_r($_SESSION); echo "\n"; ?> </pre> -- Edit bug report at: http://bugs.php.net/?id=15310&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]