#21268 [Opn->Csd]: session_decode does corretly the job, but returns FALSE !!!
| From: | iliaa@php.net | Date: | Sun, 29 Dec 2002 18:51:09 +0000 |
| Subject: | #21268 [Opn->Csd]: session_decode does corretly the job, but returns FALSE !!! | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-28689@lists.php.net to get a copy of this message | ||
ID: 21268
Updated by: iliaa@php.net
Reported By: JeanFrederic@Loiseau.org
-Status: Open
+Status: Closed
Bug Type: Session related
Operating System: Windows XP
PHP Version: 4.2.3
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-12-29 11:06:40] JeanFrederic@Loiseau.org
I believed that session_decode was not working, because it was always
returning false, BUT it works... even if it returns FALSE !
Here is my sample code :
<?php
session_start();
$_SESSION['test']=20;
echo "test = ".$_SESSION['test']."<br><br>";
$buffer=session_encode();
echo "buffer = ".$buffer."<br><br>";
$_SESSION['test']=10;
echo "test = ".$_SESSION['test']."<br><br>";
if (session_decode($buffer)==FALSE) echo "<br>It returns FALSE
!!!!<br>";
echo "test = ".$_SESSION['test']."<br><br>";
?>
here is the ouput (after a REFRESH) :
test = 20
buffer = test|i:20;
test = 10
It returns FALSE !!!!
test = 20
It display "It returns FALSE", but $_SESSION['test'] is correctly
initialized with 20 as it was...
Do I missed something ? or is it a bug ?
Thanks in advance,
Jean-Frederic
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21268&edit=1