From: Dmitry Stogov Date: Wed, 7 May 2014 12:15:29 +0000 (+0400) Subject: Fixed bug introduced during conversion to "phpng" X-Git-Tag: POST_PHPNG_MERGE~384^2~24^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e75f2d1f763ad84d4450c646466066960720fc91;p=php Fixed bug introduced during conversion to "phpng" --- diff --git a/ext/xml/xml.c b/ext/xml/xml.c index d8eed905f3..6bc6acbb1e 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -897,7 +897,7 @@ void _xml_characterDataHandler(void *userData, const XML_Char *s, int len) zval tag; zval *curtag, *mytype, *myval; - ZEND_HASH_FOREACH_VAL(Z_ARRVAL(parser->data), curtag) { + ZEND_HASH_REVERSE_FOREACH_VAL(Z_ARRVAL(parser->data), curtag) { if ((mytype = zend_hash_str_find(Z_ARRVAL_P(curtag),"type", sizeof("type") - 1))) { if (!strcmp(Z_STRVAL_P(mytype), "cdata")) { if ((myval = zend_hash_str_find(Z_ARRVAL_P(curtag), "value", sizeof("value") - 1))) { @@ -910,6 +910,7 @@ void _xml_characterDataHandler(void *userData, const XML_Char *s, int len) } } } + break; } ZEND_HASH_FOREACH_END(); if (parser->level <= XML_MAXLEVEL) {