From: Dmitry Stogov Date: Thu, 10 May 2007 14:58:17 +0000 (+0000) Subject: Fixed bug #41337 (WSDL parsing doesn't ignore non soap bindings) X-Git-Tag: php-5.2.3RC1~124 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb045249e572c922fc7a2ea50cc8a428ab3607c6;p=php Fixed bug #41337 (WSDL parsing doesn't ignore non soap bindings) --- diff --git a/NEWS b/NEWS index 5d9b9b169a..96d588ec18 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ PHP NEWS - Fixed altering $this via argument named "this". (Dmitry) - Fixed PHP CLI to use the php.ini from the binary location. (Hannes) - Fixed bug #41347 (checkdnsrr() segfaults on empty hostname). (Scott) +- Fixed bug #41337 (WSDL parsing doesn't ignore non soap bindings). (Dmitry) - Fixed bug #41326 (Writing empty tags with Xmlwriter::WriteElement[ns]) (Pierre) - Fixed bug #41321 (downgrade read errors in getimagesize() to E_NOTICE). diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 923215228f..ec1d07e81a 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -654,6 +654,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC) for (i = 0; i < n; i++) { xmlNodePtr *tmp, service; xmlNodePtr trav, port; + int has_soap_port = 0; zend_hash_get_current_data(&ctx.services, (void **)&tmp); service = *tmp; @@ -716,8 +717,15 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC) trav2 = trav2->next; } if (!address) { - soap_error0(E_ERROR, "Parsing WSDL: No address associated with "); + if (has_soap_port || trav->next) { + efree(tmpbinding); + trav = trav->next; + continue; + } else { + soap_error0(E_ERROR, "Parsing WSDL: No address associated with "); + } } + has_soap_port = 1; location = get_attribute(address->properties, "location"); if (!location) { diff --git a/ext/soap/tests/bugs/bug41337.phpt b/ext/soap/tests/bugs/bug41337.phpt new file mode 100755 index 0000000000..cd777d1dea --- /dev/null +++ b/ext/soap/tests/bugs/bug41337.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #41337 (WSDL parsing doesn't ignore non soap bindings) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug41337.wsdl b/ext/soap/tests/bugs/bug41337.wsdl new file mode 100755 index 0000000000..14e5dc4b4e --- /dev/null +++ b/ext/soap/tests/bugs/bug41337.wsdl @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +