com php-src: only need null check here: Zend/zend_execute.c
| From: | Bob Weinand | Date: | Wed, 06 Apr 2016 21:10:24 +0000 |
| Subject: | com php-src: only need null check here: Zend/zend_execute.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95571@lists.php.net to get a copy of this message | ||
Commit: 335ca97434e2b25a0dbd04529d98152abd25c5dd
Author: Joe Watkins <krakjoe@php.net> Wed, 6 Apr 2016 22:10:24 +0100
Parents: e8bac369d2b8e65cc6b374a9dded6a5c41cb1798
Branches: typed_ref_properties
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=335ca97434e2b25a0dbd04529d98152abd25c5dd
Log:
only need null check here
Changed paths:
M Zend/zend_execute.c
Diff:
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 8906b05..30fde39 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1406,7 +1406,7 @@ static zend_never_inline void zend_post_incdec_overloaded_property(zval
*object,
if (ZEND_CLASS_HAS_TYPE_HINTS(Z_OBJCE_P(object)) && Z_TYPE_P(property) == IS_STRING) {
zend_property_info *prop_info = zend_object_fetch_property_type_info_ex(object,
Z_STR_P(property), cache_slot);
-
+
if (prop_info) {
if (Z_TYPE_P(result) == IS_NULL) {
zend_throw_exception_ex(zend_ce_type_error, prop_info->type,
@@ -1416,22 +1416,18 @@ static zend_never_inline void zend_post_incdec_overloaded_property(zval
*object,
OBJ_RELEASE(Z_OBJ(obj));
zval_ptr_dtor(z);
return;
- } else if (!zend_verify_property_type(prop_info, result,
ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data)))) {
- zend_verify_property_type_error(prop_info, Z_STR_P(property), result);
- return;
}
}
}
ZVAL_DUP(&z_copy, result);
-
if (inc) {
increment_function(&z_copy);
} else {
decrement_function(&z_copy);
}
Z_OBJ_HT(obj)->write_property(&obj, property, &z_copy, cache_slot);
-
+
OBJ_RELEASE(Z_OBJ(obj));
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(z);