1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-28 07:21:26 +03:00

erroneously ignores a validation error if no error callback set

Reported by Stefan Behnel
https://bugzilla.gnome.org/show_bug.cgi?id=724903
This commit is contained in:
Daniel Veillard 2014-06-10 16:06:14 +08:00
parent fcb1bb56ff
commit a16eb96807

View File

@ -2633,11 +2633,8 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
/* /*
* The id is already defined in this DTD. * The id is already defined in this DTD.
*/ */
if ((ctxt != NULL) && (ctxt->error != NULL)) { xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED, "ID %s already defined\n", value, NULL, NULL);
"ID %s already defined\n",
value, NULL, NULL);
}
#endif /* LIBXML_VALID_ENABLED */ #endif /* LIBXML_VALID_ENABLED */
xmlFreeID(ret); xmlFreeID(ret);
return(NULL); return(NULL);