Skip to content

Commit

Permalink
Remove always-true condition from php_dom_iterator_move_forward()
Browse files Browse the repository at this point in the history
basenode is already checked above
  • Loading branch information
nielsdos committed Jul 11, 2023
1 parent b355315 commit a2fde39
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ext/dom/dom_iterators.c
Expand Up @@ -219,8 +219,7 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter) /* {{{ */
if (php_dom_is_cache_tag_stale_from_node(&iterator->cache_tag, basenode)) {
php_dom_mark_cache_tag_up_to_date_from_node(&iterator->cache_tag, basenode);
previndex = 0;
if (basenode && (basenode->type == XML_DOCUMENT_NODE ||
basenode->type == XML_HTML_DOCUMENT_NODE)) {
if (basenode->type == XML_DOCUMENT_NODE || basenode->type == XML_HTML_DOCUMENT_NODE) {
curnode = xmlDocGetRootElement((xmlDoc *) basenode);
} else {
curnode = basenode->children;
Expand Down

0 comments on commit a2fde39

Please sign in to comment.