@@ -842,31 +842,25 @@ static zend_class_entry *resolve_single_class_type(zend_string *name, zend_class
842
842
static zend_always_inline zend_class_entry * zend_resolve_ce (
843
843
zend_property_info * info , zend_type * type ) {
844
844
zend_class_entry * ce ;
845
- if (UNEXPECTED (ZEND_TYPE_HAS_NAME (* type ))) {
846
- zend_string * name = ZEND_TYPE_NAME (* type );
847
-
848
- if (ZSTR_HAS_CE_CACHE (name )) {
849
- ce = ZSTR_GET_CE_CACHE (name );
850
- if (!ce ) {
851
- ce = zend_lookup_class_ex (name , NULL , ZEND_FETCH_CLASS_NO_AUTOLOAD );
852
- if (UNEXPECTED (!ce )) {
853
- /* Cannot resolve */
854
- return NULL ;
855
- }
856
- }
857
- } else {
858
- ce = resolve_single_class_type (name , info -> ce );
859
- if (!ce ) {
860
- /* Cannot resolve */
861
- return NULL ;
862
- }
863
- if (!(info -> ce -> ce_flags & ZEND_ACC_IMMUTABLE )) {
864
- zend_string_release (name );
865
- ZEND_TYPE_SET_CE (* type , ce );
866
- }
845
+ zend_string * name = NULL ;
846
+
847
+ if (UNEXPECTED (!ZEND_TYPE_HAS_NAME (* type ))) {
848
+ return ZEND_TYPE_CE (* type );
849
+ }
850
+
851
+ name = ZEND_TYPE_NAME (* type );
852
+
853
+ if (ZSTR_HAS_CE_CACHE (name )) {
854
+ ce = ZSTR_GET_CE_CACHE (name );
855
+ if (!ce ) {
856
+ ce = zend_lookup_class_ex (name , NULL , ZEND_FETCH_CLASS_NO_AUTOLOAD );
867
857
}
868
858
} else {
869
- ce = ZEND_TYPE_CE (* type );
859
+ ce = resolve_single_class_type (name , info -> ce );
860
+ if (ce && !(info -> ce -> ce_flags & ZEND_ACC_IMMUTABLE )) {
861
+ zend_string_release (name );
862
+ ZEND_TYPE_SET_CE (* type , ce );
863
+ }
870
864
}
871
865
return ce ;
872
866
}
0 commit comments