Bug #13579: variables deglobalized after session_register()

From: Date: Sat, 06 Oct 2001 20:31:21 +0000
Subject: Bug #13579: variables deglobalized after session_register()
Groups: php.dev 
Request: Send a blank email to php-dev+get-67449@lists.php.net to get a copy of this message
From: pesterhazy@gmx.net Operating system: Win2k PHP version: 4.0.6 PHP Bug Type: Session related Bug description: variables deglobalized after session_register() the following script will print out unset set the first time it is run although it should actually print 'set' twice; somehow, the variable needs to be globalized again after the session has been registered. normal php4 setup with everything compiled-in. php -v >> 4.0.6devel --------------------- function test() { global $glb_var; session_save_path("e:\\temp"); session_start(); session_register('glb_var'); test2(); print "glb_var='$glb_var'<br>"; global $glb_var; print "glb_var='$glb_var'"; } function test2() { global $glb_var; $glb_var = 'set'; } $glb_var = 'unset'; test(); -- Edit bug report at: http://bugs.php.net/?id=13579&edit=1

« previous php.dev (#67449) next »