File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,10 @@ static void zend_resource_dtor(zend_resource *res)
66
66
res -> ptr = NULL ;
67
67
68
68
ld = zend_hash_index_find_ptr (& list_destructors , r .type );
69
- if (ld ) {
70
- if (ld -> list_dtor_ex ) {
71
- ld -> list_dtor_ex (& r );
72
- }
73
- } else {
74
- zend_error (E_WARNING , "Unknown list entry type (%d)" , r .type );
69
+ ZEND_ASSERT (ld && "Unknown list entry type" );
70
+
71
+ if (ld -> list_dtor_ex ) {
72
+ ld -> list_dtor_ex (& r );
75
73
}
76
74
}
77
75
@@ -191,12 +189,10 @@ void plist_entry_destructor(zval *zv)
191
189
zend_rsrc_list_dtors_entry * ld ;
192
190
193
191
ld = zend_hash_index_find_ptr (& list_destructors , res -> type );
194
- if (ld ) {
195
- if (ld -> plist_dtor_ex ) {
196
- ld -> plist_dtor_ex (res );
197
- }
198
- } else {
199
- zend_error (E_WARNING ,"Unknown list entry type (%d)" , res -> type );
192
+ ZEND_ASSERT (ld && "Unknown list entry type" );
193
+
194
+ if (ld -> plist_dtor_ex ) {
195
+ ld -> plist_dtor_ex (res );
200
196
}
201
197
}
202
198
free (res );
You can’t perform that action at this time.
0 commit comments