From: Dmitry Stogov Date: Mon, 14 Nov 2011 08:43:00 +0000 (+0000) Subject: Fixed bug #44686 (SOAP-ERROR: Parsing WSDL with references) X-Git-Tag: php-5.3.9RC2~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf2803d4630791d0642cafa4cb91ddc43cb1f6ca;p=php Fixed bug #44686 (SOAP-ERROR: Parsing WSDL with references) --- diff --git a/NEWS b/NEWS index 2425acb888..7b84fcde83 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,9 @@ PHP NEWS - Phar: . Fixed bug #60261 (NULL pointer dereference in phar). (Felipe) +- SOAP + . Fixed bug #44686 (SOAP-ERROR: Parsing WSDL with references). (Dmitry) + 03 Nov 2011, PHP 5.3.9RC1 - Core: diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c index f0fe981b15..159a759921 100644 --- a/ext/soap/php_schema.c +++ b/ext/soap/php_schema.c @@ -1081,8 +1081,8 @@ static int schema_group(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr groupType, sdlTyp nsptr = xmlSearchNs(groupType->doc, groupType, BAD_CAST(ns)); if (nsptr != NULL) { smart_str_appends(&key, (char*)nsptr->href); - smart_str_appendc(&key, ':'); } + smart_str_appendc(&key, ':'); smart_str_appends(&key, type); smart_str_0(&key); @@ -1508,9 +1508,9 @@ static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTyp nsptr = xmlSearchNs(element->doc, element, BAD_CAST(ns)); if (nsptr != NULL) { smart_str_appends(&nscat, (char*)nsptr->href); - smart_str_appendc(&nscat, ':'); newType->namens = estrdup((char*)nsptr->href); - } + } + smart_str_appendc(&nscat, ':'); smart_str_appends(&nscat, type); newType->name = estrdup(type); smart_str_0(&nscat); @@ -1734,9 +1734,9 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl nsptr = xmlSearchNs(attrType->doc, attrType, BAD_CAST(ns)); if (nsptr != NULL) { smart_str_appends(&key, (char*)nsptr->href); - smart_str_appendc(&key, ':'); newAttr->namens = estrdup((char*)nsptr->href); } + smart_str_appendc(&key, ':'); smart_str_appends(&key, attr_name); smart_str_0(&key); newAttr->ref = estrdup(key.c); @@ -1970,8 +1970,8 @@ static int schema_attributeGroup(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrGrou nsptr = xmlSearchNs(attrGroup->doc, attrGroup, BAD_CAST(ns)); if (nsptr != NULL) { smart_str_appends(&key, (char*)nsptr->href); - smart_str_appendc(&key, ':'); } + smart_str_appendc(&key, ':'); smart_str_appends(&key, group_name); smart_str_0(&key); newAttr->ref = estrdup(key.c); diff --git a/ext/soap/tests/bugs/bug44686.phpt b/ext/soap/tests/bugs/bug44686.phpt new file mode 100644 index 0000000000..cff97999c6 --- /dev/null +++ b/ext/soap/tests/bugs/bug44686.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #44686 (SOAP-ERROR: Parsing WSDL with references) +--SKIPIF-- + +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- + +--EXPECT-- +ok + diff --git a/ext/soap/tests/bugs/bug44686.wsdl b/ext/soap/tests/bugs/bug44686.wsdl new file mode 100644 index 0000000000..87b4640b78 --- /dev/null +++ b/ext/soap/tests/bugs/bug44686.wsdl @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +