PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Web Services » SOAP » Bug #8377

Bugfix: weird "No deserializer" error when passing large arrays to SOAP_Value

Details

Submitted2006-08-07 19:41 UTC
Fromjsp at rheoweb dot com
Assignedyunosh
StatusClosed
PackageSOAP
PHP VersionIrrelevant
OSall
Roadmaps(Not assigned)

Comments

[2006-08-07 19:41 UTC] jsp at rheoweb dot com

Description:
------------
When passing an array of more than 11 SOAP_Value elements to SOAP_Value, an error is generated: "No deserializer for {http://schemas.xmlsoap.org/soap/envelope/}OutboundVariable"

The problem is due to the _isHash() function in SOAP/Base.php (beginning at line 806). For ANY array of more than 11 elements, the function WRONGLY returns FALSE (signifying an error) without providing any explanatory error message!

This bugfix will more than likely also fix bug #4746.

Test script:
---------------
The simplest patch that corrects the problem is this:

822c822
< if ($it++ > 10) {
---
> else if ($it++ > 10) {

A better patch that is more efficient and generates an error message can be found here (valid for 30 days):

http://rheoweb.com/Base.php.diff

Please let me know if (when?) you decide to incorporate either patch.

Expected result:
----------------
I expect a valid SOAP_Value object, which is what I would get if I pass an array of less than 11 elements.

Failing that, I expect some kind of error message that tells me what's happening.

I expect programmers of every creed and code to avoid silently embedding arbitrary constants in their code without at least generating a warning on request to folks who get burned by it:-)

Actual result:
--------------
No deserializer for {http://schemas.xmlsoap.org/soap/envelope/}OutboundVariable