php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64589 SOAP arrays with non-sequentially indexed keys ignored
Submitted: 2013-04-05 09:32 UTC Modified: 2013-04-10 20:09 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: cweiske@php.net Assigned: dmitry (profile)
Status: Not a bug Package: SOAP related
PHP Version: 5.5.0beta1 OS: Linux
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: cweiske@php.net
New email:
PHP Version: OS:

 

 [2013-04-05 09:32 UTC] cweiske@php.net
Description:
------------
When passing a non-sequentially numerically indexed array to a SOAPClient method, it gets ignored as "empty".

Test script:
---------------
http://p.cweiske.de/35

Expected result:
----------------
<brokenStrings>
 <string>foo</string>
 <string>foo2</string>
</brokenStrings>


Actual result:
--------------
<brokenStrings/>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-06 15:44 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: dmitry
 [2013-04-09 10:43 UTC] dmitry@php.net
-Status: Assigned +Status: Not a bug
 [2013-04-09 10:43 UTC] dmitry@php.net
This is the expected behavior.

The value you are passing in brokenStrings does not conform to WSDL specification (it can't be transferred without data lose). You may use Apache Map extension to pass array with indexes.
 [2013-04-10 20:09 UTC] cweiske@php.net
I understand the reasoning that the data cannot be transferred without data loss.

But I'd like to get notified about that the data I want to send cannot be sent and will be ignored - an E_WARNING for example. Currently, I also suffer a data loss - and it goes unnoticed.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Jan 19 15:03:15 2022 UTC