summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_execute.c12
-rw-r--r--Zend/zend_object_handlers.c6
-rw-r--r--Zend/zend_object_handlers.h2
3 files changed, 11 insertions, 9 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index f4189c485a..76e33ca005 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -178,7 +178,7 @@ static inline void zend_fetch_property_address_inner(zval *object, znode *op2, z
}
T(result->u.var).var.ptr_ptr = ptr_ptr;
} else if (Z_OBJ_HT_P(object)->read_property) {
- T(result->u.var).var.ptr = Z_OBJ_HT_P(object)->read_property(object, prop_ptr, 0 TSRMLS_CC);
+ T(result->u.var).var.ptr = Z_OBJ_HT_P(object)->read_property(object, prop_ptr, BP_VAR_W TSRMLS_CC);
T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr;
} else {
zend_error(E_WARNING, "This object doesn't support property references");
@@ -1100,7 +1100,7 @@ static void zend_fetch_property_address_read(znode *result, znode *op1, znode *o
}
/* here we are sure we are dealing with an object */
- *retval = Z_OBJ_HT_P(container)->read_property(container, offset, (zend_bool) ((type==BP_VAR_IS) ? 1 : 0) TSRMLS_CC);
+ *retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
if (offset == &tmp) {
zval_dtor(offset);
}
@@ -1151,7 +1151,7 @@ static void zend_pre_incdec_property(znode *result, znode *op1, znode *op2, temp
}
if (!have_get_ptr) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, 0 TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_RW TSRMLS_CC);
if (z->type == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
@@ -1209,7 +1209,7 @@ static void zend_post_incdec_property(znode *result, znode *op1, znode *op2, tem
}
if (!have_get_ptr) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, 0 TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_RW TSRMLS_CC);
if (z->type == IS_OBJECT && Z_OBJ_HT_P(object)->get) {
zval *value = Z_OBJ_HT_P(object)->get(z TSRMLS_CC);
@@ -1624,10 +1624,10 @@ static inline int zend_binary_assign_op_obj_helper(int (*binary_op)(zval *result
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
- z = Z_OBJ_HT_P(object)->read_property(object, property, 0 TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_RW TSRMLS_CC);
break;
case ZEND_ASSIGN_DIM:
- z = Z_OBJ_HT_P(object)->read_dimension(object, property, BP_VAR_W TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_dimension(object, property, BP_VAR_RW TSRMLS_CC);
break;
}
if (z->type == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 1812a31aa4..a27fdf623b 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -261,14 +261,16 @@ ZEND_API int zend_check_property_access(zend_object *zobj, char *prop_info_name
return zend_verify_property_access(property_info, zobj->ce TSRMLS_CC) ? SUCCESS : FAILURE;
}
-zval *zend_std_read_property(zval *object, zval *member, zend_bool silent TSRMLS_DC)
+zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC)
{
zend_object *zobj;
zval tmp_member;
zval **retval;
zval *rv = NULL;
zend_property_info *property_info;
-
+ int silent;
+
+ silent = (type == BP_VAR_IS);
zobj = Z_OBJ_P(object);
if (member->type != IS_STRING) {
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index a9ad231fb8..89c4b06923 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -29,7 +29,7 @@ union _zend_function;
symbol table, its reference count should be 0.
*/
/* Used to fetch property from the object, read-only */
-typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, zend_bool silent TSRMLS_DC);
+typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, int type TSRMLS_DC);
/* Used to fetch dimension from the object, read-only */
typedef zval *(*zend_object_read_dimension_t)(zval *object, zval *offset, int type TSRMLS_DC);