From: Christian Stocker Date: Mon, 23 Feb 2004 15:54:45 +0000 (+0000) Subject: - mixed up name and value... fixed X-Git-Tag: RELEASE_0_2_0~216 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c7143efe97a95a6dfc9ca9e6c963c2d9c81f6f2;p=php - mixed up name and value... fixed --- diff --git a/ext/xml/compat.c b/ext/xml/compat.c index 5c3f903835..4c8cb01f05 100644 --- a/ext/xml/compat.c +++ b/ext/xml/compat.c @@ -86,18 +86,18 @@ _start_element_handler_ns(void *user, const xmlChar *name, const xmlChar *prefix xmlChar *qualified_name_attr = NULL; for (i = 0; i < nb_attributes; i += 1) { - attrs[z] = xmlStrdup( attributes[y]); - + if (attributes[y+1] != NULL) { - _qualify_namespace(parser, xmlStrndup(attributes[y + 3] , (int) (attributes[y + 4] - attributes[y + 3])), attributes[2], &qualified_name_attr); + _qualify_namespace(parser, attributes[y] , attributes[2], &qualified_name_attr); } else { - qualified_name_attr = xmlStrndup(attributes[y + 3] , (int) (attributes[y + 4] - attributes[y + 3])); + qualified_name_attr = xmlStrdup(attributes[y]); } - attrs[z + 1] = qualified_name_attr; + attrs[z] = qualified_name_attr; + attrs[z + 1] = xmlStrndup(attributes[y + 3] , (int) (attributes[y + 4] - attributes[y + 3])); z += 2; y += 5; } - + attrs[z] = NULL; } parser->h_start_element(parser->user, (const XML_Char *) qualified_name, (const XML_Char **) attrs);