Skip to content

Commit ad5e5f9

Browse files
committed
Use copy str
1 parent b784ed0 commit ad5e5f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/dom/element.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ static void dom_element_get_in_scope_namespace_info(php_dom_libxml_ns_mapper *ns
17761776
zend_object *obj = Z_OBJ(zv);
17771777

17781778
if (ZSTR_LEN(prefix) != 0) {
1779-
ZVAL_STRING(OBJ_PROP_NUM(obj, 0), (const char *) ZSTR_VAL(prefix));
1779+
ZVAL_STR_COPY(OBJ_PROP_NUM(obj, 0), prefix);
17801780
} else {
17811781
ZVAL_NULL(OBJ_PROP_NUM(obj, 0));
17821782
}

0 commit comments

Comments
 (0)