Skip to content

Commit

Permalink
Use xmlSetNsProp when possible to prevent parsing the name
Browse files Browse the repository at this point in the history
The normal xmlSetProp() function parses the name to find the namespace.
But we don't care about the namespace in this case.
  • Loading branch information
nielsdos committed Jul 24, 2023
1 parent 869ecf5 commit c8964b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/dom/element.c
Expand Up @@ -174,7 +174,7 @@ static xmlAttrPtr dom_element_reflected_attribute_write(dom_object *obj, zval *n

/* Typed property, so it is a string already */
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
Expand Down

0 comments on commit c8964b9

Please sign in to comment.