#22642 [NEW]: After saving a session var in a var, nulling the session var clears the 2nd var
| From: | dave at orangechicken dot com | Date: | Tue, 11 Mar 2003 21:54:35 +0000 |
| Subject: | #22642 [NEW]: After saving a session var in a var, nulling the session var clears the 2nd var | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-35371@lists.php.net to get a copy of this message | ||
From: dave at orangechicken dot com
Operating system: Linux / Apache 1.3.27
PHP version: 4.3.1
PHP Bug Type: Session related
Bug description: After saving a session var in a var, nulling the session var clears the 2nd var
OK, the summary was too short to concisely enter what I mean. Here's the
real version:
After assigning a stored $_SESSION var to another variable, assigning null
to the $_SESSION var clears the other variable too.
This worked before 4.3.1 (possibly occurred in 4.3.0 - we skipped from
4.2.7 to 4.3.1).
Here's a snippet where the problem occurs. $_SESSION[ 'login_redirect' ]
contains the value 'checkout.php'.
================================
$redirect = $_SESSION[ 'login_redirect' ];
echo $redirect; // outputs checkout.php
$_SESSION[ 'login_redirect' ] = null;
echo $redirect; // outputs <nothing>
================================
Here's the configure string
'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml'
'--enable-bcmath' '--enable-calendar' '--with-curl'
'--enable-ftp'
'--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr'
'--with-xpm-dir=/usr/X11R6' '--with-imap' '--with-imap-ssl'
'--with-kerberos' '--with-mcrypt' '--enable-magic-quotes'
'--with-mysql'
'--with-pear' '--enable-xslt' '--with-xslt-sablot'
'--enable-sockets'
'--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr'
'--enable-gd-native-ttf' '--enable-versioning' '--with-zlib'
--
Edit bug report at http://bugs.php.net/?id=22642&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22642&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22642&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22642&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22642&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22642&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22642&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22642&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22642&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22642&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22642&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22642&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22642&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22642&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22642&r=gnused