|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-05-23 05:11 UTC] mgf@php.net
[2003-05-23 05:26 UTC] fdsoft at pganet dot com
[2003-05-23 05:35 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 13:00:02 2026 UTC |
PHP 4.3.2RC4's session handling seems to be broken. This did not occur with RC3 or any PHP version which came before. The problem seems to be in storing floats in a SESSION. Sample code: // floattest1.php: <?php session_start(); $_SESSION['test1'] = 'abcdefg'; $_SESSION['blah'] = 6542.2; $_SESSION['test2'] = 'gfha'; header('location: floattest2.php'); ?> // floattest2.php: <?php session_start(); echo '<pre>'; var_dump($_SESSION); ?> floattest2's output with 4.3.2RC1 (perfectly good): array(3) { ["test1"]=> string(7) "abcdefg" ["blah"]=> float(6542.2) ["test2"]=> string(4) "gfha" } 4.3.2RC4's buggy output: array(3) { ["test1"]=> string(7) "abcdefg" ["blah"]=> float(6542.2) [";test2"]=> string(4) "gfha" } Notice that "test2" somehow got changed to ";test2". Take a more complex SESSION with more stuff stored inside and you'll see even more weird results. Values changing place with keys and vice versa, variables getting their values unexpectedly changed to NULL and so on.