File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -219,13 +219,14 @@ void zend_weakrefs_notify(zend_object *object) {
219219 /* Annoyingly we can't use the HT destructor here, because we need access to the key (which
220220 * is the object address), which is not provided to the dtor. */
221221 const zend_ulong obj_key = zend_object_to_weakref_key (object );
222- void * tagged_ptr ;
222+ void * tagged_ptr = zend_hash_index_find_ptr ( & EG ( weakrefs ), obj_key ) ;
223223#if ZEND_DEBUG
224224 ZEND_ASSERT (tagged_ptr && "Tracking of the IS_OBJ_WEAKLY_REFERENCE flag should be precise" );
225225#endif
226- while (( tagged_ptr = zend_hash_index_find_ptr ( & EG ( weakrefs ), obj_key )) ) {
226+ while (tagged_ptr ) {
227227 zend_hash_index_del (& EG (weakrefs ), obj_key );
228228 zend_weakref_unref (object , tagged_ptr );
229+ tagged_ptr = zend_hash_index_find_ptr (& EG (weakrefs ), obj_key );
229230 }
230231}
231232
You can’t perform that action at this time.
0 commit comments