From: Derick Rethans Date: Mon, 6 Jun 2005 13:09:23 +0000 (+0000) Subject: - MH44: Problems with user defined error handler and wrong usage of references X-Git-Tag: php-5.0.1b1~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=941f16914dbe72567f0c0315a8313ea466f4ca0e;p=php - MH44: Problems with user defined error handler and wrong usage of references --- diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 01610c2027..3b42350f01 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2016,10 +2016,10 @@ ZEND_VM_HANDLER(62, ZEND_RETURN, CONST|TMP|VAR|CV, ANY) if (OP1_TYPE == IS_VAR && !(*retval_ptr_ptr)->is_ref) { if (EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr || (opline->extended_value == ZEND_RETURNS_FUNCTION && !EX_T(opline->op1.u.var).var.fcall_returned_reference)) { - zend_error(E_STRICT, "Only variable references should be returned by reference"); if (OP1_TYPE == IS_VAR && free_op1.var == NULL) { PZVAL_LOCK(*retval_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */ } + zend_error(E_STRICT, "Only variable references should be returned by reference"); ZEND_VM_C_GOTO(return_by_value); } }