|
|
|
@ -150,7 +150,7 @@ static int zend_verify_property_access(zend_property_info *property_info, zend_c |
|
|
|
case ZEND_ACC_PUBLIC: |
|
|
|
return 1; |
|
|
|
case ZEND_ACC_PROTECTED: |
|
|
|
return zend_check_protected(ce, EG(scope)); |
|
|
|
return zend_check_protected(property_info->ce, EG(scope)); |
|
|
|
case ZEND_ACC_PRIVATE: |
|
|
|
if (ce==EG(scope) && EG(scope)) { |
|
|
|
return 1; |
|
|
|
@ -238,6 +238,7 @@ ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce |
|
|
|
EG(std_property_info).name = Z_STRVAL_P(member); |
|
|
|
EG(std_property_info).name_length = Z_STRLEN_P(member); |
|
|
|
EG(std_property_info).h = h; |
|
|
|
EG(std_property_info).ce = ce; |
|
|
|
property_info = &EG(std_property_info); |
|
|
|
} |
|
|
|
return property_info; |
|
|
|
@ -579,7 +580,7 @@ static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC) |
|
|
|
zend_get_property_guard(zobj, property_info, member, &guard) == SUCCESS && |
|
|
|
!guard->in_unset) { |
|
|
|
/* have unseter - try with it! */ |
|
|
|
guard->in_unset = 1; /* prevent circular setting */ |
|
|
|
guard->in_unset = 1; /* prevent circular unsetting */ |
|
|
|
zend_std_call_unsetter(object, member TSRMLS_CC); |
|
|
|
guard->in_unset = 0; |
|
|
|
} |
|
|
|
@ -842,6 +843,7 @@ ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, char *propert |
|
|
|
std_property_info.name = property_name; |
|
|
|
std_property_info.name_length = property_name_len; |
|
|
|
std_property_info.h = zend_get_hash_value(std_property_info.name, std_property_info.name_length+1); |
|
|
|
std_property_info.ce = ce; |
|
|
|
property_info = &std_property_info; |
|
|
|
} |
|
|
|
|
|
|
|
|