From e6f42c1ed024c10f20b1e1c8b43f1d82a26958e1 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 11 Jan 2025 10:50:07 +0100 Subject: [PATCH] Fix incorrect casts --- ext/dom/php_dom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 7ebe9ab9cfd..dd70d64826a 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1474,7 +1474,7 @@ void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xml if (local) { int len = (int) ZSTR_LEN(local); - if (doc != NULL && (tmp = xmlDictExists(doc->dict, (const xmlChar *)local, len)) != NULL) { + if (doc != NULL && (tmp = xmlDictExists(doc->dict, (const xmlChar *)ZSTR_VAL(local), len)) != NULL) { mapptr->local = BAD_CAST tmp; } else { mapptr->local = BAD_CAST ZSTR_VAL(zend_string_copy(local)); @@ -1485,7 +1485,7 @@ void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xml if (ns) { int len = (int) ZSTR_LEN(ns); - if (doc != NULL && (tmp = xmlDictExists(doc->dict, (const xmlChar *)ns, len)) != NULL) { + if (doc != NULL && (tmp = xmlDictExists(doc->dict, (const xmlChar *)ZSTR_VAL(ns), len)) != NULL) { mapptr->ns = BAD_CAST tmp; } else { mapptr->ns = BAD_CAST ZSTR_VAL(zend_string_copy(ns));