From: Dmitry Stogov Date: Mon, 29 Mar 2004 15:00:31 +0000 (+0000) Subject: Implicit clonning strict warning was added for ze1_compatibility_mode X-Git-Tag: php-5.0.0RC2RC1~173 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75d1e4ca7d8834037ff589a92dc2f5548d93c533;p=php Implicit clonning strict warning was added for ze1_compatibility_mode --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index a15eee043c..2efd300c57 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -394,6 +394,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode if (Z_OBJ_HANDLER_P(value, clone_obj) == NULL) { zend_error(E_ERROR, "Trying to clone an uncloneable object of class %s", Z_OBJCE_P(orig_value)->name); } + zend_error(E_STRICT, "Implicit clonning object of class '%s' because of 'zend.ze1_compatibility_mode'", Z_OBJCE_P(orig_value)->name); value->value.obj = Z_OBJ_HANDLER_P(orig_value, clone_obj)(orig_value TSRMLS_CC); } else if (value_op->op_type == IS_TMP_VAR) { zval *orig_value = value; @@ -572,6 +573,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 *variable_ptr = *value; variable_ptr->refcount = refcount; variable_ptr->is_ref = 1; + zend_error(E_STRICT, "Implicit clonning object of class '%s' because of 'zend.ze1_compatibility_mode'", Z_OBJCE_P(value)->name); variable_ptr->value.obj = Z_OBJ_HANDLER_P(value, clone_obj)(value TSRMLS_CC); if (type != IS_TMP_VAR) { value->refcount--; @@ -588,6 +590,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2 } *variable_ptr = *value; INIT_PZVAL(variable_ptr); + zend_error(E_STRICT, "Implicit clonning object of class '%s' because of 'zend.ze1_compatibility_mode'", Z_OBJCE_P(value)->name); variable_ptr->value.obj = Z_OBJ_HANDLER_P(value, clone_obj)(value TSRMLS_CC); } } else if (PZVAL_IS_REF(variable_ptr)) { @@ -2868,6 +2871,7 @@ return_by_value: if (Z_OBJ_HT_P(retval_ptr)->clone_obj == NULL) { zend_error(E_ERROR, "Trying to clone an uncloneable object of class %s", Z_OBJCE_P(retval_ptr)->name); } + zend_error(E_STRICT, "Implicit clonning object of class '%s' because of 'zend.ze1_compatibility_mode'", Z_OBJCE_P(retval_ptr)->name); (*EG(return_value_ptr_ptr))->value.obj = Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC); } else if (!EG(free_op1)) { /* Not a temp var */ if (PZVAL_IS_REF(retval_ptr) && retval_ptr->refcount > 0) {