summaryrefslogtreecommitdiff
path: root/Zend/zend_object_handlers.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-10-17 15:00:54 +0400
committerDmitry Stogov <dmitry@zend.com>2014-10-17 15:00:54 +0400
commit6b203aa26243a46775483a1318427b081095c126 (patch)
tree0b81cb4cc5edd88ec21aea4a2ee79b5a6861eb60 /Zend/zend_object_handlers.c
parent35dc0a2e302b0a5f79ca7597ffda12a7a23fa4ed (diff)
downloadphp-git-6b203aa26243a46775483a1318427b081095c126.tar.gz
Don't make useless CSE
Diffstat (limited to 'Zend/zend_object_handlers.c')
-rw-r--r--Zend/zend_object_handlers.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 6679cb1e46..d143b00663 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -468,9 +468,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_
zval tmp_member;
zval *retval;
zend_property_info *property_info;
- int silent;
- silent = (type == BP_VAR_IS);
zobj = Z_OBJ_P(object);
ZVAL_UNDEF(&tmp_member);
@@ -485,7 +483,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_
#endif
/* make zend_get_property_info silent if we have getter - we may want to use it */
- property_info = zend_get_property_info_quick(zobj->ce, Z_STR_P(member), silent || (zobj->ce->__get != NULL), cache_slot TSRMLS_CC);
+ property_info = zend_get_property_info_quick(zobj->ce, Z_STR_P(member), (type == BP_VAR_IS) || (zobj->ce->__get != NULL), cache_slot TSRMLS_CC);
if (EXPECTED(property_info != NULL)) {
if (EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
@@ -533,13 +531,13 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_
zend_error(E_ERROR, "Cannot access property started with '\\0'");
}
}
- if (!silent) {
+ if (type != BP_VAR_IS) {
zend_error(E_NOTICE,"Undefined property: %s::$%s", zobj->ce->name->val, Z_STRVAL_P(member));
}
retval = &EG(uninitialized_zval);
}
} else {
- if (!silent) {
+ if ((type != BP_VAR_IS)) {
zend_error(E_NOTICE,"Undefined property: %s::$%s", zobj->ce->name->val, Z_STRVAL_P(member));
}
retval = &EG(uninitialized_zval);