|  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 (profile)
Status: Closed Package: WDDX related
PHP Version: 5.2.3RC1 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: php_lists at realplain dot com
New email:
PHP Version: OS:


 [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-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 19 23:01:29 2024 UTC