From: Dmitry Stogov Date: Tue, 27 Jan 2004 12:07:57 +0000 (+0000) Subject: Allow s with same names X-Git-Tag: php-5.0.0b4RC1~279 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5294a539e279c9a262a404909b4ea5b459accc6e;p=php Allow s with same names --- 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);