Bug in SOAP extension... Re-Keying arrays?
| From: | Mike Benoit | Date: | Sat, 29 Oct 2005 20:10:44 +0000 |
| Subject: | Bug in SOAP extension... Re-Keying arrays? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-19821@lists.php.net to get a copy of this message | ||
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) {
[0]=>
string(5) "Test1"
[1]=>
string(5) "Test2"
}
IN: array( '10' => 'Test1', '20' => 'Test2');
OUT:
array(2) {
[0]=>
string(5) "Test1"
[1]=>
string(5) "Test2"
}
IN: array( '_' => '', 10 => 'Test1', 20 =>
'Test2');
OUT:
array(3) {
["_"]=>
string(0) ""
[10]=>
string(5) "Test1"
[20]=>
string(5) "Test2"
}
IN: array( '_' => NULL, 10 => 'Test1', 20 => 'Test2');
OUT:
array(2) {
[10]=>
string(5) "Test1"
[20]=>
string(5) "Test2"
}
--
Mike Benoit <ipso@snappymail.ca>
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc