File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -185,18 +185,20 @@ PHP_METHOD(DOMNodeList, item)
185
185
bool restart = true;
186
186
int relative_index = index ;
187
187
if (index >= objmap -> cached_obj_index && objmap -> cached_obj && !php_dom_is_cache_tag_stale_from_node (& objmap -> cache_tag , nodep )) {
188
- nodep = dom_object_get_node (objmap -> cached_obj );
188
+ xmlNodePtr cached_obj_xml_node = dom_object_get_node (objmap -> cached_obj );
189
+
189
190
/* The node cannot be NULL if the cache is valid. If it is NULL, then it means we
190
191
* forgot an invalidation somewhere. Take the defensive programming approach and invalidate
191
192
* it here if it's NULL (except in debug mode where we would want to catch this). */
192
- if (UNEXPECTED (nodep == NULL )) {
193
+ if (UNEXPECTED (cached_obj_xml_node == NULL )) {
193
194
#if ZEND_DEBUG
194
195
ZEND_UNREACHABLE ();
195
196
#endif
196
197
reset_objmap_cache (objmap );
197
198
} else {
198
199
restart = false;
199
200
relative_index -= objmap -> cached_obj_index ;
201
+ nodep = cached_obj_xml_node ;
200
202
}
201
203
}
202
204
if (objmap -> nodetype == XML_ATTRIBUTE_NODE || objmap -> nodetype == XML_ELEMENT_NODE ) {
You can’t perform that action at this time.
0 commit comments