Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » PHP
  • » [PHP-DEV] Bug in SOAP extension... Re-Keying arrays? [RSS Feed]

#1 Oct. 29, 2005 21:31:07

Mike B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Bug in SOAP extension... Re-Keying arrays?


I searched bugs.php.net but couldn't find anything relating to this
issue. Unfortunately I am unable to test with versions newer than PHP
5.0.4 right now, so forgive me if this has already been addressed.

It seems that if the SOAP extension can cast the first key of an array
to an INT, it re-keys the entire array. As well it seems to strip any
NULL values from the array, regardless of what the key is. Which seems
strange, but for a workaround to this issue it serves me well.

IN = PHP Server sends
OUT = PHP Client receives

IN: array( 10 => 'Test1', 20 => 'Test2');
OUT:
array(2) {
=>
string(5) "Test1"
=>
string(5) "Test2"
}


IN: array( '10' => 'Test1', '20' => 'Test2');
OUT:
array(2) {
=>
string(5) "Test1"
=>
string(5) "Test2"
}


IN: array( '_' => '', 10 => 'Test1', 20 => 'Test2');
OUT:
array(3) {
=>
string(0) ""
=>
string(5) "Test1"
=>
string(5) "Test2"
}

IN: array( '_' => NULL, 10 => 'Test1', 20 => 'Test2');
OUT:
array(2) {
=>
string(5) "Test1"
=>
string(5) "Test2"
}

--
Mike Benoit <>signature.ascDescription:This is a digitally signed message part

Attachments:
attachment signature.asc (189 bytes)

Offline

  • Root
  • » PHP
  • » [PHP-DEV] Bug in SOAP extension... Re-Keying arrays? [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support