Boolean value getting improperly converted to array
| From: | Rob Booth | Date: | Fri, 23 Jul 2004 03:19:32 +0000 |
| Subject: | Boolean value getting improperly converted to array | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-1575@lists.php.net to get a copy of this message | ||
I hope someone can help me out with this. I am sending a object to my SOAP
Sever that holds a couple of boolean values. The object appears correct,
but one of my boolean values always gets converted by PEAR::SOAP to be an
array of values. I've tracked down where this conversion is happening, it's
in the _decode function of Base.php. While looping over the items in my
object PEAR::SOAP evaluates this line " } else if
(isset($return->{$item->name})) {" which it ends up evaluating as true for
this one boolean value.
Here is the item that is being checked by this code:
array (
'value' => 'false',
'name' => 'DeleteOldestWhenFull',
'type' => 'boolean',
'namespace' => 'urn:Voicemail',
'type_namespace' => 'http://www.w3.org/2001/XMLSchema',
'attributes' =>
array (
),
'arrayType' => '',
'options' =>
array (
),
'nqn' =>
array (
'name' => 'DeleteOldestWhenFull',
'ns' => '',
'namespace' => 'urn:Voicemail',
),
'tqn' =>
array (
'name' => 'boolean',
'ns' => '',
'namespace' => 'http://www.w3.org/2001/XMLSchema',
),
'type_prefix' => '',
)
As far as I can tell that looks perfect (exactly like another boolean value
in the same object, except for it's name).
After the line of evaluation happens my new object looks like this:
array (
'ClassOfServiceID' => 11,
'Name' => 'New COS',
'Number' => '200',
'DefaultPassword' => '4321',
'MaxMessageLengthSeconds' => 0,
'MessageTimePerMailboxMinutes' => 0,
'MaximumNumMessages' => 0,
'DeleteOldestWhenFull' =>
array (
0 => false,
1 => false,
),
'DirectoryListingEnabled' => false,
'ClassOfServiceRightList' => NULL,
)
Why does DeleteOldestWhenFull convert to an array, when
DirectoryListingEnabled doesn't? I can't seem to figure out what exactly is
happening here. Any help would be greatly appreaciated. I'm using an older
version of PEAR::SOAP and am unable to upgrade it, I can however make
appropriate changes to the version I have if this is a bug that has been
fixed.
Thanks,
Rob