@@ -956,7 +956,11 @@ static void zend_resolve_property_types(void) /* {{{ */
956
956
zend_property_info * prop_info ;
957
957
958
958
ZEND_HASH_FOREACH_PTR (CG (class_table ), ce ) {
959
- if (UNEXPECTED (ce -> type == ZEND_INTERNAL_CLASS && ZEND_CLASS_HAS_TYPE_HINTS (ce ))) {
959
+ if (ce -> type != ZEND_INTERNAL_CLASS ) {
960
+ continue ;
961
+ }
962
+
963
+ if (UNEXPECTED (ZEND_CLASS_HAS_TYPE_HINTS (ce ))) {
960
964
ZEND_HASH_FOREACH_PTR (& ce -> properties_info , prop_info ) {
961
965
if (ZEND_TYPE_IS_NAME (prop_info -> type )) {
962
966
zend_string * type_name = ZEND_TYPE_NAME (prop_info -> type );
@@ -970,6 +974,7 @@ static void zend_resolve_property_types(void) /* {{{ */
970
974
}
971
975
} ZEND_HASH_FOREACH_END ();
972
976
}
977
+ ce -> ce_flags |= ZEND_ACC_PROPERTY_TYPES_RESOLVED ;
973
978
} ZEND_HASH_FOREACH_END ();
974
979
}
975
980
/* }}} */
@@ -986,6 +991,8 @@ int zend_post_startup(void) /* {{{ */
986
991
zend_executor_globals * executor_globals = ts_resource (executor_globals_id );
987
992
#endif
988
993
994
+ zend_resolve_property_types ();
995
+
989
996
if (zend_post_startup_cb ) {
990
997
int (* cb )(void ) = zend_post_startup_cb ;
991
998
@@ -995,8 +1002,6 @@ int zend_post_startup(void) /* {{{ */
995
1002
}
996
1003
}
997
1004
998
- zend_resolve_property_types ();
999
-
1000
1005
#ifdef ZTS
1001
1006
* GLOBAL_FUNCTION_TABLE = * compiler_globals -> function_table ;
1002
1007
* GLOBAL_CLASS_TABLE = * compiler_globals -> class_table ;
0 commit comments