summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_execute.c8
-rw-r--r--Zend/zend_object_handlers.c6
-rw-r--r--Zend/zend_object_handlers.h2
-rw-r--r--Zend/zend_objects_API.c2
4 files changed, 10 insertions, 8 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 42c6055de8..53d506f9bd 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -991,7 +991,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 TSRMLS_CC);
+ *retval = Z_OBJ_HT_P(container)->read_property(container, offset, (zend_bool) ((type==BP_VAR_IS) ? 1 : 0) TSRMLS_CC);
if (offset == &tmp) {
zval_dtor(offset);
}
@@ -1037,7 +1037,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 TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, 0 TSRMLS_CC);
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
@@ -1084,7 +1084,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 TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, 0 TSRMLS_CC);
SEPARATE_ZVAL_IF_NOT_REF(&z);
*retval = *z;
zendi_zval_copy_ctor(*retval);
@@ -1473,7 +1473,7 @@ static inline int zend_binary_assign_op_obj_helper(int (*binary_op)(zval *result
}
if (!have_get_ptr) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, 0 TSRMLS_CC);
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 399f7bfab8..7405377aad 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -238,7 +238,7 @@ static inline zend_property_info *zend_get_property_info(zend_object *zobj, zval
}
-zval *zend_std_read_property(zval *object, zval *member TSRMLS_DC)
+zval *zend_std_read_property(zval *object, zval *member, zend_bool silent TSRMLS_DC)
{
zend_object *zobj;
zval tmp_member;
@@ -274,7 +274,9 @@ zval *zend_std_read_property(zval *object, zval *member TSRMLS_DC)
retval = &EG(uninitialized_zval_ptr);
}
} else {
- zend_error(E_NOTICE,"Undefined property: %s::$%s", zobj->ce->name, Z_STRVAL_P(member));
+ if (!silent) {
+ zend_error(E_NOTICE,"Undefined property: %s::$%s", zobj->ce->name, Z_STRVAL_P(member));
+ }
retval = &EG(uninitialized_zval_ptr);
}
}
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index 760b37a745..0a642b95a8 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -25,7 +25,7 @@
union _zend_function;
/* Used to fetch property from the object, read-only */
-typedef zval *(*zend_object_read_property_t)(zval *object, zval *member TSRMLS_DC);
+typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, zend_bool silent TSRMLS_DC);
/* Used to fetch dimension from the object, read-only */
typedef zval *(*zend_object_read_dimension_t)(zval *object, zval *offset TSRMLS_DC);
diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c
index 3004144642..15be3f1d37 100644
--- a/Zend/zend_objects_API.c
+++ b/Zend/zend_objects_API.c
@@ -255,7 +255,7 @@ ZEND_API zval* zend_object_proxy_get(zval *property TSRMLS_DC)
zend_proxy_object *probj = zend_object_store_get_object(property TSRMLS_CC);
if (Z_OBJ_HT_P(probj->object) && Z_OBJ_HT_P(probj->object)->read_property) {
- return Z_OBJ_HT_P(probj->object)->read_property(probj->object, probj->property TSRMLS_CC);
+ return Z_OBJ_HT_P(probj->object)->read_property(probj->object, probj->property, 0 TSRMLS_CC);
} else {
zend_error(E_WARNING, "Cannot read property of object - no read handler defined");
}