|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41283 WDDX deserialize array key bug
Submitted: 2007-05-04 14:37 UTC Modified: 2007-05-05 15:15 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: php dot net at trueprices dot net Assigned:
Status: Closed Package: WDDX related
PHP Version: 5.2.2 OS: Debian
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: php dot net at trueprices dot net
New email:
PHP Version: OS:


 [2007-05-04 14:37 UTC] php dot net at trueprices dot net
wddx_deserialize/wddx_unserialize does not deserialize the array keys correctly

Array with the following keys will not deserialize correctly in PHP 5.2.1 & 5.2.2 but did deserialize correctly in PHP4

array('1.1' => 'One 1','1.2' => 'One 2') 

array keys will become 1  and therefor the 2nd key 1.2 will overwrite the first key 1.1

Reproduce code:
$data = array(
  'somearray' => array('1.1' => 'One 1','1.2' => 'One 2')

echo "<pre>Should be:\n";
echo '</pre>';

echo "<pre>Is:\n";
echo '</pre>';

Expected result:
array(1) {
  array(1) {
    array(2) {
      string(5) "One 1"
      string(5) "One 2"

Actual result:
array(1) {
  array(1) {
    array(1) {
      string(5) "One 2"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-05 15:15 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 05:01:31 2024 UTC