]> granicus.if.org Git - php/commitdiff
- Fixed Bug #44811: Improved error message when creating a new
authorDavid Coallier <davidc@php.net>
Wed, 7 May 2008 14:57:56 +0000 (14:57 +0000)
committerDavid Coallier <davidc@php.net>
Wed, 7 May 2008 14:57:56 +0000 (14:57 +0000)
                    SoapClient has invalid data.

ext/soap/php_sdl.c

index 6be5c8284f7657f408e90c54ec4651db591077ac..3d4c900d12de700ffcbb33c7bb756f8592574e52 100644 (file)
@@ -240,7 +240,12 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include
        wsdl = soap_xmlParseFile(struri TSRMLS_CC);
        
        if (!wsdl) {
-               soap_error1(E_ERROR, "Parsing WSDL: Couldn't load from '%s'", struri);
+               xmlErrorPtr xmlErrorPtr = xmlGetLastError();
+               if (xmlErrorPtr) {
+                       soap_error2(E_ERROR, "Parsing WSDL: Couldn't load from '%s' : %s", struri, xmlErrorPtr->message);
+               } else {
+                       soap_error1(E_ERROR, "Parsing WSDL: Couldn't load from '%s'", struri);
+               }
        }
 
        zend_hash_add(&ctx->docs, struri, strlen(struri)+1, (void**)&wsdl, sizeof(xmlDocPtr), NULL);