1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Remove always-true condition from php_dom_iterator_move_forward()

basenode is already checked above
This commit is contained in:
Niels Dossche
2023-07-10 21:43:09 +02:00
parent b3553159a7
commit a2fde39169

View File

@@ -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;