Skip to content

Commit

Permalink
Fix incorrect casts
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdos committed Jan 11, 2025
1 parent 11937b3 commit e6f42c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/dom/php_dom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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));
Expand Down

0 comments on commit e6f42c1

Please sign in to comment.