@@ -956,25 +956,25 @@ ZEND_API zval *zend_std_read_property(zend_object *zobj, zend_string *name, int
956956uninit_error :
957957 if (UNEXPECTED (zend_lazy_object_must_init (zobj ))) {
958958 if (!prop_info || (Z_PROP_FLAG_P (retval ) & IS_PROP_LAZY )) {
959- zobj = zend_lazy_object_init (zobj );
960- if (!zobj ) {
959+ zend_object * instance = zend_lazy_object_init (zobj );
960+ if (!instance ) {
961961 retval = & EG (uninitialized_zval );
962962 goto exit ;
963963 }
964964
965- if (UNEXPECTED (guard )) {
965+ if (UNEXPECTED (guard && instance -> ce -> ce_flags & ZEND_ACC_USE_GUARDS )) {
966966 uint32_t guard_type = (type == BP_VAR_IS ) && zobj -> ce -> __isset
967967 ? IN_ISSET : IN_GET ;
968- guard = zend_get_property_guard (zobj , name );
968+ guard = zend_get_property_guard (instance , name );
969969 if (!((* guard ) & guard_type )) {
970970 (* guard ) |= guard_type ;
971- retval = zend_std_read_property (zobj , name , type , cache_slot , rv );
971+ retval = zend_std_read_property (instance , name , type , cache_slot , rv );
972972 (* guard ) &= ~guard_type ;
973973 return retval ;
974974 }
975975 }
976976
977- return zend_std_read_property (zobj , name , type , cache_slot , rv );
977+ return zend_std_read_property (instance , name , type , cache_slot , rv );
978978 }
979979 }
980980 if (type != BP_VAR_IS ) {
@@ -1013,7 +1013,7 @@ static zval *forward_write_to_lazy_object(zend_object *zobj,
10131013 return & EG (error_zval );
10141014 }
10151015
1016- if (UNEXPECTED (guarded )) {
1016+ if (UNEXPECTED (guarded && instance -> ce -> ce_flags & ZEND_ACC_USE_GUARDS )) {
10171017 uint32_t * guard = zend_get_property_guard (instance , name );
10181018 if (!((* guard ) & IN_SET )) {
10191019 (* guard ) |= IN_SET ;
0 commit comments