diff options
author | Nikita Popov <nikic@php.net> | 2015-10-01 16:33:30 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-10-01 16:33:30 +0200 |
commit | 8557e8323a33288dd75eaafc4fb26a295351698a (patch) | |
tree | 4a48bea4ee51f7067fa123f04d465fe15f6256f7 /Zend/zend_execute.c | |
parent | c25e81ab7be3e40fa8ce029b2da084cc7f6fb8b8 (diff) | |
download | php-git-8557e8323a33288dd75eaafc4fb26a295351698a.tar.gz |
Remove checks for read_property retval being NULL
read_property uses &EG(uninitialized_zval) instead.
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r-- | Zend/zend_execute.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index c6c73490e5..f88ccb1ea7 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1451,8 +1451,8 @@ static zend_never_inline void zend_assign_op_overloaded_property(zval *object, z ZVAL_OBJ(&obj, Z_OBJ_P(object)); Z_ADDREF(obj); - if (Z_OBJ_HT(obj)->read_property && - (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, cache_slot, &rv)) != NULL) { + if (EXPECTED(Z_OBJ_HT(obj)->read_property)) { + z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, cache_slot, &rv); if (UNEXPECTED(EG(exception))) { OBJ_RELEASE(Z_OBJ(obj)); return; @@ -1964,8 +1964,8 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c if (EXPECTED(Z_OBJ_HT_P(container)->get_property_ptr_ptr)) { zval *ptr = Z_OBJ_HT_P(container)->get_property_ptr_ptr(container, prop_ptr, type, cache_slot); if (NULL == ptr) { - if (Z_OBJ_HT_P(container)->read_property && - (ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type, cache_slot, result)) != NULL) { + if (EXPECTED(Z_OBJ_HT_P(container)->read_property)) { + ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type, cache_slot, result); if (ptr != result) { ZVAL_INDIRECT(result, ptr); } else if (UNEXPECTED(Z_ISREF_P(ptr) && Z_REFCOUNT_P(ptr) == 1)) { |