@@ -657,9 +657,11 @@ void _xml_startElementHandler(void *userData, const XML_Char *name, const XML_Ch
657
657
array_init (& tag );
658
658
array_init (& atr );
659
659
660
- _xml_add_to_info ( parser , ZSTR_VAL (tag_name ) + parser -> toffset );
660
+ char * skipped_tag_name = SKIP_TAGSTART ( ZSTR_VAL (tag_name ));
661
661
662
- add_assoc_string (& tag , "tag" , SKIP_TAGSTART (ZSTR_VAL (tag_name ))); /* cast to avoid gcc-warning */
662
+ _xml_add_to_info (parser , skipped_tag_name );
663
+
664
+ add_assoc_string (& tag , "tag" , skipped_tag_name );
663
665
add_assoc_string (& tag , "type" , "open" );
664
666
add_assoc_long (& tag , "level" , parser -> level );
665
667
@@ -741,12 +743,14 @@ void _xml_endElementHandler(void *userData, const XML_Char *name)
741
743
add_assoc_string (zv , "type" , "complete" );
742
744
}
743
745
} else {
744
- _xml_add_to_info (parser , ZSTR_VAL (tag_name ) + parser -> toffset );
746
+ char * skipped_tag_name = SKIP_TAGSTART (ZSTR_VAL (tag_name ));
747
+
748
+ _xml_add_to_info (parser , skipped_tag_name );
745
749
746
750
zval * data = xml_get_separated_data (parser );
747
751
if (EXPECTED (data )) {
748
752
array_init (& tag );
749
- add_assoc_string (& tag , "tag" , SKIP_TAGSTART ( ZSTR_VAL ( tag_name ))); /* cast to avoid gcc-warning */
753
+ add_assoc_string (& tag , "tag" , skipped_tag_name );
750
754
add_assoc_string (& tag , "type" , "close" );
751
755
add_assoc_long (& tag , "level" , parser -> level );
752
756
zend_hash_next_index_insert (Z_ARRVAL_P (data ), & tag );
0 commit comments