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)
6666 res -> ptr = NULL ;
6767
6868 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 );
7573 }
7674}
7775
@@ -191,12 +189,10 @@ void plist_entry_destructor(zval *zv)
191189 zend_rsrc_list_dtors_entry * ld ;
192190
193191 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 );
200196 }
201197 }
202198 free (res );
You can’t perform that action at this time.
0 commit comments