summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2004-01-27 12:07:57 +0000
committerDmitry Stogov <dmitry@php.net>2004-01-27 12:07:57 +0000
commit5294a539e279c9a262a404909b4ea5b459accc6e (patch)
tree52375c7b277a07c695c68513a261435de15660e8
parent6eeec41c4decef7599332e17303ff0ffddad14dc (diff)
downloadphp-git-5294a539e279c9a262a404909b4ea5b459accc6e.tar.gz
Allow <element>s with same names
-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 041658bcc6..d2ab5ffb2f 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -1547,7 +1547,11 @@ static int schema_element(sdlPtr sdl, xmlAttrPtr tsn, xmlNodePtr element, sdlTyp
smart_str_0(&key);
if (zend_hash_add(addHash, key.c, key.len + 1, &newType, sizeof(sdlTypePtr), NULL) != SUCCESS) {
- php_error(E_ERROR, "Error parsing schema (element '%s' already defined)",key.c);
+ if (cur_type == NULL) {
+ php_error(E_ERROR, "Error parsing schema (element '%s' already defined)",key.c);
+ } else {
+ zend_hash_next_index_insert(addHash, &newType, sizeof(sdlTypePtr), NULL);
+ }
}
smart_str_free(&key);