summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2009-04-21 09:40:13 +0000
committerDmitry Stogov <dmitry@php.net>2009-04-21 09:40:13 +0000
commit197a950b491e89c4c6572fa94db588317b6a3aa9 (patch)
tree94bfb5aa69084fd12198cf0b46500d849f54ecfd /Zend/zend_execute.c
parent04250059a86a80e70460b69b6f0f40ea2dd17989 (diff)
downloadphp-git-197a950b491e89c4c6572fa94db588317b6a3aa9.tar.gz
Fixed bug #48004 (Error handler prevents creation of default object)
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r--Zend/zend_execute.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index fb0e8fcd0b..1c7636476c 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -536,9 +536,9 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval
(Z_TYPE_P(object) == IS_BOOL && Z_LVAL_P(object) == 0) ||
(Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0)) {
SEPARATE_ZVAL_IF_NOT_REF(object_ptr);
- zval_dtor(object);
+ zval_dtor(*object_ptr);
+ object_init(*object_ptr);
object = *object_ptr;
- object_init(object);
zend_error(E_STRICT, "Creating default object from empty value");
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
@@ -551,8 +551,6 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval
}
}
- /* here we are sure we are dealing with an object */
-
/* separate our value if necessary */
if (value_op->op_type == IS_TMP_VAR) {
zval *orig_value = value;