From: Dmitry Stogov Date: Mon, 2 Apr 2007 13:43:08 +0000 (+0000) Subject: Fixed bug #37013 (server hangs when returning circular object references) X-Git-Tag: php-5.2.2RC1~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36c6ad915bf9ce0c0894258957feb1fedad193c5;p=php Fixed bug #37013 (server hangs when returning circular object references) --- diff --git a/NEWS b/NEWS index 785f8a656d..2462c6d319 100644 --- a/NEWS +++ b/NEWS @@ -146,6 +146,8 @@ PHP NEWS statements in mysqli) (Stas) - Fixed bug #37386 (autocreating element doesn't assign value to first node). (Rob) +- Fixed bug #37013 (server hangs when returning circular object references). + (Dmitry) - Fixed unallocated memory access/double free in in array_user_key_compare() (MOPB-24 by Stefan Esser) (Stas) - Fixed wrong length calculation in unserialize S type diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index beeb99a38d..2ae06a768a 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -270,6 +270,85 @@ static encodePtr find_encoder_by_type_name(sdlPtr sdl, const char *type) return NULL; } +static zend_bool soap_check_zval_ref(zval *data, xmlNodePtr node TSRMLS_DC) { + xmlNodePtr *node_ptr; + + if (SOAP_GLOBAL(ref_map)) { + if (Z_TYPE_P(data) == IS_OBJECT) { + data = (zval*)zend_objects_get_address(data TSRMLS_CC); + } + if (zend_hash_index_find(SOAP_GLOBAL(ref_map), (ulong)data, (void**)&node_ptr) == SUCCESS) { + xmlAttrPtr attr = (*node_ptr)->properties; + char *id; + smart_str prefix = {0}; + + if (*node_ptr == node) { + return 0; + } + xmlNodeSetName(node, (*node_ptr)->name); + xmlSetNs(node, (*node_ptr)->ns); + if (SOAP_GLOBAL(soap_version) == SOAP_1_1) { + while (1) { + attr = get_attribute(attr, "id"); + if (attr == NULL || attr->ns == NULL) { + break; + } + attr = attr->next; + } + if (attr) { + id = (char*)attr->children->content; + } else { + SOAP_GLOBAL(cur_uniq_ref)++; + smart_str_appendl(&prefix, "#ref", 4); + smart_str_append_long(&prefix, SOAP_GLOBAL(cur_uniq_ref)); + smart_str_0(&prefix); + id = prefix.c; + xmlSetProp((*node_ptr), BAD_CAST("id"), BAD_CAST(id+1)); + } + xmlSetProp(node, BAD_CAST("href"), BAD_CAST(id)); + } else { + attr = get_attribute_ex(attr, "id", SOAP_1_2_ENC_NAMESPACE); + if (attr) { + id = (char*)attr->children->content; + } else { + SOAP_GLOBAL(cur_uniq_ref)++; + smart_str_appendl(&prefix, "#ref", 4); + smart_str_append_long(&prefix, SOAP_GLOBAL(cur_uniq_ref)); + smart_str_0(&prefix); + id = prefix.c; + set_ns_prop((*node_ptr), SOAP_1_2_ENC_NAMESPACE, "id", id+1); + } + set_ns_prop(node, SOAP_1_2_ENC_NAMESPACE, "ref", id); + } + smart_str_free(&prefix); + return 1; + } else { + zend_hash_index_update(SOAP_GLOBAL(ref_map), (ulong)data, (void**)&node, sizeof(xmlNodePtr), NULL); + } + } + return 0; +} + +static zend_bool soap_check_xml_ref(zval **data, xmlNodePtr node TSRMLS_DC) +{ + zval **data_ptr; + + if (SOAP_GLOBAL(ref_map)) { + if (zend_hash_index_find(SOAP_GLOBAL(ref_map), (ulong)node, (void**)&data_ptr) == SUCCESS) { + if (*data != *data_ptr) { + zval_ptr_dtor(data); + *data = *data_ptr; + (*data)->is_ref = 1; + (*data)->refcount++; + return 1; + } + } else { + zend_hash_index_update(SOAP_GLOBAL(ref_map), (ulong)node, (void**)data, sizeof(zval*), NULL); + } + } + return 0; +} + xmlNodePtr master_to_xml(encodePtr encode, zval *data, int style, xmlNodePtr parent) { xmlNodePtr node = NULL; @@ -1303,14 +1382,20 @@ static zval *to_zval_object_ex(encodeTypePtr type, xmlNodePtr data, zend_class_e if (enc) { zval *base; - MAKE_STD_ZVAL(ret); + ALLOC_INIT_ZVAL(ret); + if (soap_check_xml_ref(&ret, data TSRMLS_CC)) { + return ret; + } object_init_ex(ret, ce); base = master_to_zval_int(enc, data); set_zval_property(ret, "_", base TSRMLS_CC); } else { - MAKE_STD_ZVAL(ret); + ALLOC_INIT_ZVAL(ret); FIND_XML_NULL(data, ret); + if (soap_check_xml_ref(&ret, data TSRMLS_CC)) { + return ret; + } object_init_ex(ret, ce); } } else if (sdlType->kind == XSD_TYPEKIND_EXTENSION && @@ -1335,6 +1420,9 @@ static zval *to_zval_object_ex(encodeTypePtr type, xmlNodePtr data, zend_class_e ret = master_to_zval_int(sdlType->encode, data); } FIND_XML_NULL(data, ret); + if (soap_check_xml_ref(&ret, data TSRMLS_CC)) { + return ret; + } if (get_zval_property(ret, "any" TSRMLS_CC) != NULL) { unset_zval_property(ret, "any" TSRMLS_CC); redo_any = 1; @@ -1346,15 +1434,21 @@ static zval *to_zval_object_ex(encodeTypePtr type, xmlNodePtr data, zend_class_e } else { zval *base; - MAKE_STD_ZVAL(ret); + ALLOC_INIT_ZVAL(ret); + if (soap_check_xml_ref(&ret, data TSRMLS_CC)) { + return ret; + } object_init_ex(ret, ce); base = master_to_zval_int(sdlType->encode, data); set_zval_property(ret, "_", base TSRMLS_CC); } } else { - MAKE_STD_ZVAL(ret); + ALLOC_INIT_ZVAL(ret); FIND_XML_NULL(data, ret); + if (soap_check_xml_ref(&ret, data TSRMLS_CC)) { + return ret; + } object_init_ex(ret, ce); } if (sdlType->model) { @@ -1400,10 +1494,13 @@ static zval *to_zval_object_ex(encodeTypePtr type, xmlNodePtr data, zend_class_e } } else { - MAKE_STD_ZVAL(ret); + ALLOC_INIT_ZVAL(ret); FIND_XML_NULL(data, ret); - object_init_ex(ret, ce); + if (soap_check_xml_ref(&ret, data TSRMLS_CC)) { + return ret; + } + object_init_ex(ret, ce); trav = data->children; while (trav != NULL) { @@ -1719,10 +1816,13 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo xmlAddChild(parent, xmlParam); } + if (soap_check_zval_ref(data, xmlParam TSRMLS_CC)) { + return xmlParam; + } if (prop != NULL) { - sdlTypePtr array_el; + sdlTypePtr array_el; - if (Z_TYPE_P(data) == IS_ARRAY && + if (Z_TYPE_P(data) == IS_ARRAY && !is_map(data) && sdlType->attributes == NULL && sdlType->model != NULL && @@ -1796,6 +1896,9 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo xmlParam = xmlNewNode(NULL, BAD_CAST("BOGUS")); xmlAddChild(parent, xmlParam); + if (soap_check_zval_ref(data, xmlParam TSRMLS_CC)) { + return xmlParam; + } if (prop != NULL) { i = zend_hash_num_elements(prop); zend_hash_internal_pointer_reset(prop); @@ -3214,6 +3317,25 @@ void encode_reset_ns() { TSRMLS_FETCH(); SOAP_GLOBAL(cur_uniq_ns) = 0; + SOAP_GLOBAL(cur_uniq_ref) = 0; + if (SOAP_GLOBAL(ref_map)) { + zend_hash_destroy(SOAP_GLOBAL(ref_map)); + } else { + SOAP_GLOBAL(ref_map) = emalloc(sizeof(HashTable)); + } + zend_hash_init(SOAP_GLOBAL(ref_map), 0, NULL, NULL, 0); +} + +void encode_finish() +{ + TSRMLS_FETCH(); + SOAP_GLOBAL(cur_uniq_ns) = 0; + SOAP_GLOBAL(cur_uniq_ref) = 0; + if (SOAP_GLOBAL(ref_map)) { + zend_hash_destroy(SOAP_GLOBAL(ref_map)); + efree(SOAP_GLOBAL(ref_map)); + SOAP_GLOBAL(ref_map) = NULL; + } } encodePtr get_conversion(int encode) diff --git a/ext/soap/php_encoding.h b/ext/soap/php_encoding.h index 1c3e4dd72c..2e0b94c4cd 100644 --- a/ext/soap/php_encoding.h +++ b/ext/soap/php_encoding.h @@ -201,6 +201,7 @@ void whiteSpace_collapse(xmlChar* str); xmlNodePtr sdl_guess_convert_xml(encodeTypePtr enc, zval* data, int style, xmlNodePtr parent); zval *sdl_guess_convert_zval(encodeTypePtr enc, xmlNodePtr data); +void encode_finish(); void encode_reset_ns(); xmlNsPtr encode_add_ns(xmlNodePtr node, const char* ns); diff --git a/ext/soap/php_soap.h b/ext/soap/php_soap.h index b2da6ff35d..345790463c 100644 --- a/ext/soap/php_soap.h +++ b/ext/soap/php_soap.h @@ -168,6 +168,8 @@ ZEND_BEGIN_MODULE_GLOBALS(soap) HashTable *class_map; int features; HashTable wsdl_cache; + int cur_uniq_ref; + HashTable *ref_map; ZEND_END_MODULE_GLOBALS(soap) #ifdef PHP_WIN32 diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 9cae584e81..8120e8880d 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -479,6 +479,7 @@ static void php_soap_init_globals(zend_soap_globals *soap_globals TSRMLS_DC) soap_globals->sdl = NULL; soap_globals->soap_version = SOAP_1_1; soap_globals->mem_cache = NULL; + soap_globals->ref_map = NULL; } PHP_MSHUTDOWN_FUNCTION(soap) @@ -2583,7 +2584,9 @@ static void do_soap_call(zval* this_ptr, xmlFreeDoc(request); if (ret && Z_TYPE(response) == IS_STRING) { + encode_reset_ns(); ret = parse_packet_soap(this_ptr, Z_STRVAL(response), Z_STRLEN(response), fn, NULL, return_value, output_headers TSRMLS_CC); + encode_finish(); } zval_dtor(&response); @@ -2626,7 +2629,9 @@ static void do_soap_call(zval* this_ptr, xmlFreeDoc(request); if (ret && Z_TYPE(response) == IS_STRING) { + encode_reset_ns(); ret = parse_packet_soap(this_ptr, Z_STRVAL(response), Z_STRLEN(response), NULL, function, return_value, output_headers TSRMLS_CC); + encode_finish(); } zval_dtor(&response); @@ -3282,6 +3287,8 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c xmlAttrPtr attr; sdlFunctionPtr function; + encode_reset_ns(); + /* Get element */ env = NULL; trav = request->children; @@ -3530,6 +3537,9 @@ ignore_header: func = func->children; } deserialize_parameters(func, function, num_params, parameters); + + encode_finish(); + return function; } @@ -3982,6 +3992,8 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function } } + encode_finish(); + if (function && function->responseName == NULL && body->children == NULL && head == NULL) { xmlFreeDoc(doc); @@ -4196,6 +4208,8 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function } } + encode_finish(); + return doc; } diff --git a/ext/soap/tests/bugs/bug36999.phpt b/ext/soap/tests/bugs/bug36999.phpt new file mode 100755 index 0000000000..35fc61e2c8 --- /dev/null +++ b/ext/soap/tests/bugs/bug36999.phpt @@ -0,0 +1,50 @@ +--TEST-- +Bug #36999 (xsd:long values clamped to LONG_MAX instead of using double) +--SKIPIF-- + +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +server = new SoapServer($wsdl); + $this->server->addFunction('echoLong'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$soap = new LocalSoapClient(dirname(__FILE__)."/bug36999.wsdl"); + +function test($num) { + global $soap; + try { + printf("%s %0.0f\n", gettype($num), $num); + $ret = $soap->echoLong($num); + printf("%s %0.0f\n", gettype($ret), $ret); + } catch (SoapFault $ex) { + var_dump($ex); + } +} +test(3706790240); +?> +--EXPECTF-- +%s 3706790240 +%s 3706790240 diff --git a/ext/soap/tests/bugs/bug36999.wsdl b/ext/soap/tests/bugs/bug36999.wsdl new file mode 100755 index 0000000000..80d20b053b --- /dev/null +++ b/ext/soap/tests/bugs/bug36999.wsdl @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ext/soap/tests/bugs/bug37013.phpt b/ext/soap/tests/bugs/bug37013.phpt new file mode 100755 index 0000000000..45f314293b --- /dev/null +++ b/ext/soap/tests/bugs/bug37013.phpt @@ -0,0 +1,58 @@ +--TEST-- +Bug #37013 (server hangs when returning circular object references) +--SKIPIF-- + +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- + + + + + + + +REQUEST; + + +class ThingWithParent +{ + var $parent; + var $id; + var $children; + function __construct( $id, $parent ) { + $this->id = $id; + $this->parent = $parent; + } +} + + +class MultiRefTest { + public function getThingWithParent() { + $p = new ThingWithParent( 1, null ); + $p2 = new ThingWithParent( 2, $p ); + $p3 = new ThingWithParent( 3, $p ); + + $p->children = array( $p2, $p3 ); + + return $p2; + } +} + + +$server = new SoapServer(dirname(__FILE__)."/bug37013.wsdl"); +$server->setClass( "MultiRefTest"); +$server->handle( $request ); +?> +--EXPECT-- + +132 diff --git a/ext/soap/tests/bugs/bug37013.wsdl b/ext/soap/tests/bugs/bug37013.wsdl new file mode 100755 index 0000000000..dbd77fd8df --- /dev/null +++ b/ext/soap/tests/bugs/bug37013.wsdl @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt index 0d779dc063..16e806a64a 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt @@ -12,9 +12,10 @@ class SOAPStruct { } } -$struct = new SOAPStruct('arg',34,325.325); +$struct1 = new SOAPStruct('arg',34,325.325); +$struct2 = new SOAPStruct('arg',34,325.325); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); -$client->__soapCall("echoStructArray", array(array($struct,$struct)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); +$client->__soapCall("echoStructArray", array(array($struct1,$struct2)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); include("round2_base.inc"); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt index 887210548b..8bcbc1bff3 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt @@ -12,17 +12,21 @@ class SOAPStruct { } } -$struct = new SoapVar(array( +$struct1 = new SoapVar(array( + new SoapVar('arg', XSD_STRING, null, null, 'varString'), + new SoapVar('34', XSD_INT, null, null, 'varInt'), + new SoapVar('325.325', XSD_FLOAT, null, null, 'varFloat') + ),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"); +$struct2 = new SoapVar(array( new SoapVar('arg', XSD_STRING, null, null, 'varString'), new SoapVar('34', XSD_INT, null, null, 'varInt'), new SoapVar('325.325', XSD_FLOAT, null, null, 'varFloat') ),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"); $param = new SoapParam(new SoapVar(array( - $struct, - $struct + $struct1, + $struct2 ),SOAP_ENC_ARRAY,"ArrayOfSOAPStruct","http://soapinterop.org/xsd"), "inputStructArray"); -$struct = new SOAPStruct('arg',34,325.325); $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); $client->__soapCall("echoStructArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/")); echo $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt index 83c369dab3..a66bf99d81 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt @@ -12,9 +12,10 @@ class SOAPStruct { } } -$struct = new SOAPStruct('arg',34,325.325); +$struct1 = new SOAPStruct('arg',34,325.325); +$struct2 = new SOAPStruct('arg',34,325.325); $client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); -$client->echoStructArray(array($struct,$struct)); +$client->echoStructArray(array($struct1,$struct2)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); include("round2_base.inc"); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt index f6b67f2ba7..ac8387e951 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt @@ -11,9 +11,10 @@ class SOAPStruct { $this->varFloat = $f; } } -$struct = new SOAPStruct('arg',34,325.325); +$struct1 = new SOAPStruct('arg',34,325.325); +$struct2 = new SOAPStruct('arg',34,325.325); $client = new SoapClient(dirname(__FILE__)."/round3_groupD_import3.wsdl",array("trace"=>1,"exceptions"=>0)); -$client->echoStructArray(array($struct,$struct)); +$client->echoStructArray(array($struct1,$struct2)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); include("round3_groupD_import3.inc"); diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt index e66bbb7a21..c3c609f13f 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt @@ -1,7 +1,7 @@ --TEST-- SOAP Interop Round3 GroupE List 005 (php/wsdl): echoLinkedList (cyclic) --SKIPIF-- - + --FILE-- --EXPECT-- -1arg12arg23arg3 +1arg12arg23arg3 -1arg12arg23arg3 +1arg12arg23arg3 object(stdClass)#7 (3) { ["varInt"]=> int(1) @@ -43,7 +43,28 @@ object(stdClass)#7 (3) { ["varString"]=> string(4) "arg3" ["child"]=> - NULL + object(stdClass)#7 (3) { + ["varInt"]=> + int(1) + ["varString"]=> + string(4) "arg1" + ["child"]=> + object(stdClass)#8 (3) { + ["varInt"]=> + int(2) + ["varString"]=> + string(4) "arg2" + ["child"]=> + object(stdClass)#9 (3) { + ["varInt"]=> + int(3) + ["varString"]=> + string(4) "arg3" + ["child"]=> + *RECURSION* + } + } + } } } } diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt index 49584874d7..4c3aab74c5 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt @@ -1,7 +1,7 @@ --TEST-- SOAP Interop Round3 GroupE List 006 (php/wsdl): echoLinkedList (cyclic) --SKIPIF-- - + --FILE-- --EXPECT-- -1arg12arg23arg3 +1arg12arg23arg3 -1arg12arg23arg3 +1arg12arg23arg3 object(stdClass)#7 (3) { ["varInt"]=> int(1) ["varString"]=> string(4) "arg1" ["child"]=> - object(stdClass)#8 (3) { + &object(stdClass)#8 (3) { ["varInt"]=> int(2) ["varString"]=> @@ -43,7 +43,21 @@ object(stdClass)#7 (3) { ["varString"]=> string(4) "arg3" ["child"]=> - NULL + object(stdClass)#8 (3) { + ["varInt"]=> + int(2) + ["varString"]=> + string(4) "arg2" + ["child"]=> + object(stdClass)#9 (3) { + ["varInt"]=> + int(3) + ["varString"]=> + string(4) "arg3" + ["child"]=> + *RECURSION* + } + } } } } diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt index 0da7004009..d6e80494fa 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt @@ -11,9 +11,11 @@ class SOAPComplexType { $this->varFloat = $f; } } -$struct = new SOAPComplexType('arg',34,325.325); +$struct1 = new SOAPComplexType('arg',34,325.325); +$struct2 = new SOAPComplexType('arg',34,325.325); +$struct3 = new SOAPComplexType('arg',34,325.325); $client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); -$client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct,$struct,$struct))); +$client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct1,$struct2,$struct3))); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); include("round4_groupI_xsd.inc"); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt index 63f551448e..dd9f93f87f 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt @@ -11,9 +11,10 @@ class SOAPComplexType { $this->varFloat = $f; } } -$struct = new SOAPComplexType('arg',34,325.325); +$struct1 = new SOAPComplexType('arg',34,325.325); +$struct2 = new SOAPComplexType('arg',34,325.325); $client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); -$client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct,null,$struct))); +$client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct1,null,$struct2))); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); include("round4_groupI_xsd.inc");