Use xmlSetNsProp when possible to prevent parsing the name

The normal xmlSetProp() function parses the name to find the namespace.
But we don't care about the namespace in this case.
This commit is contained in:
Niels Dossche 2023-07-22 18:04:49 +02:00
parent 869ecf5320
commit c8964b9a08

View file

@ -174,7 +174,7 @@ static xmlAttrPtr dom_element_reflected_attribute_write(dom_object *obj, zval *n
/* Typed property, so it is a string already */ /* Typed property, so it is a string already */
ZEND_ASSERT(Z_TYPE_P(newval) == IS_STRING); ZEND_ASSERT(Z_TYPE_P(newval) == IS_STRING);
return xmlSetProp(nodep, (const xmlChar *) name, (const xmlChar *) Z_STRVAL_P(newval)); return xmlSetNsProp(nodep, NULL, (const xmlChar *) name, (const xmlChar *) Z_STRVAL_P(newval));
} }
/* {{{ className string /* {{{ className string