From 7d1dbff79de1bc0db621db4243e7b0442f1858ad Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 21 May 2007 13:13:50 +0000 Subject: [PATCH] Fixed bug #41337 WSDL parsing doesn't ignore non soap bindings --- ext/soap/php_sdl.c | 2 +- ext/soap/tests/bugs/bug41337_2.phpt | 12 +++++++ ext/soap/tests/bugs/bug41337_2.wsdl | 36 ++++++++++++++++++++ ext/soap/tests/bugs/bug41337_2_1.wsdl | 47 +++++++++++++++++++++++++++ 4 files changed, 96 insertions(+), 1 deletion(-) create mode 100755 ext/soap/tests/bugs/bug41337_2.phpt create mode 100755 ext/soap/tests/bugs/bug41337_2.wsdl create mode 100755 ext/soap/tests/bugs/bug41337_2_1.wsdl diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index ec1d07e81a..b02629a437 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -717,7 +717,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC) trav2 = trav2->next; } if (!address) { - if (has_soap_port || trav->next) { + if (has_soap_port || trav->next || i < n-1) { efree(tmpbinding); trav = trav->next; continue; diff --git a/ext/soap/tests/bugs/bug41337_2.phpt b/ext/soap/tests/bugs/bug41337_2.phpt new file mode 100755 index 0000000000..d594d2515d --- /dev/null +++ b/ext/soap/tests/bugs/bug41337_2.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_2.wsdl b/ext/soap/tests/bugs/bug41337_2.wsdl new file mode 100755 index 0000000000..46c078a0ea --- /dev/null +++ b/ext/soap/tests/bugs/bug41337_2.wsdl @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ext/soap/tests/bugs/bug41337_2_1.wsdl b/ext/soap/tests/bugs/bug41337_2_1.wsdl new file mode 100755 index 0000000000..857dc6ccf6 --- /dev/null +++ b/ext/soap/tests/bugs/bug41337_2_1.wsdl @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.50.1