summaryrefslogtreecommitdiff
path: root/ext/soap/php_schema.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/soap/php_schema.c')
-rw-r--r--ext/soap/php_schema.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c
index 565a7fb46b..0e6fb57a5b 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -232,7 +232,11 @@ int load_schema(sdlCtx *ctx, xmlNodePtr schema TSRMLS_DC)
location = get_attribute(trav->properties, "schemaLocation");
if (ns != NULL && tns != NULL && strcmp(ns->children->content,tns->children->content) == 0) {
- soap_error1(E_ERROR, "Parsing Schema: can't import schema from '%s', namespace must not match the enclosing schema 'targetNamespace'", location->children->content);
+ if (location) {
+ soap_error1(E_ERROR, "Parsing Schema: can't import schema from '%s', namespace must not match the enclosing schema 'targetNamespace'", location->children->content);
+ } else {
+ soap_error0(E_ERROR, "Parsing Schema: can't import schema. Namespace must not match the enclosing schema 'targetNamespace'");
+ }
}
if (location) {
xmlChar *base = xmlNodeGetBase(trav->doc, trav);