|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41527 WDDX deserialize numeric string array key bugs
Submitted: 2007-05-29 09:07 UTC Modified: 2007-06-11 15:21 UTC
From: php_lists at realplain dot com Assigned: iliaa
Status: Closed Package: WDDX related
PHP Version: 5.2.3RC1 OS:
Private report: No CVE-ID:
 [2007-05-29 09:07 UTC] php_lists at realplain dot com
I sent a couple messages to the Internals mailing list over the last few weeks with a better fix for Bug #41283 (, but they seem to have been ignored, so I'm opening this bug (and I discovered wrong changes in the 4.4 branch that should be fixed).

As seen with the "Reproduce code," all branches are mishandling those types of numeric keys. They worked fine up to 4.4.0, I believe, until Bug #34068 was "fixed" there (it actually never existed in 4.x as there wasn't a change of the internal functions there). (That bogus 4.x change then caused Bug #35410, #41283 (not fixed in 4.x), etc.)

Just trying to prevent more future problems like Bug #38464 I created for array_count_values() (caused by the same internal change), where individual bugs get reported/fixed, instead of fixing the root cause. :-)

Here are patches to fix these bugs in each branch:

Reproduce code:

$data = array('01' => 'Zero', '+1' => 'Plus sign', ' 1' => 'Space');

Expected result:
array(3) {
  string(4) "Zero"
  string(9) "Plus sign"
  [" 1"]=>
  string(5) "Space"

Actual result:
array(1) {
  array(1) {
    string(5) "Space"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-11 15:21 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-2015 The PHP Group
All rights reserved.
Last updated: Mon Nov 30 13:01:41 2015 UTC