From c951268912ebf0bd2f7340fe18adb97459145767 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 21 Apr 2009 09:40:33 +0000 Subject: [PATCH] Fixed bug #48004 (Error handler prevents creation of default object) --- Zend/zend_execute.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 2590656648..f1f1cea6c8 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -578,9 +578,9 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0) || (Z_TYPE_P(object) == IS_UNICODE && Z_USTRLEN_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"); @@ -593,8 +593,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; -- 2.40.0