From: Ilia Alshanetsky Date: Mon, 11 Jul 2005 18:44:37 +0000 (+0000) Subject: Make references misuse emit E_NOTICE rather E_STRICT to be compatible with X-Git-Tag: php-5.1.0b3~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a9fc3439aa41116ec5d8b59074507da0ef2f220;p=php Make references misuse emit E_NOTICE rather E_STRICT to be compatible with PHP 4.4.0 --- diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 6c98299fdc..f5e2e00d9b 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -1980,7 +1980,7 @@ ZEND_VM_HANDLER(62, ZEND_RETURN, CONST|TMP|VAR|CV, ANY) if (OP1_TYPE == IS_CONST || OP1_TYPE == IS_TMP_VAR) { /* Not supposed to happen, but we'll allow it */ - zend_error(E_STRICT, "Only variable references should be returned by reference"); + zend_error(E_NOTICE, "Only variable references should be returned by reference"); ZEND_VM_C_GOTO(return_by_value); } @@ -1996,7 +1996,7 @@ ZEND_VM_HANDLER(62, ZEND_RETURN, CONST|TMP|VAR|CV, ANY) 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_error(E_NOTICE, "Only variable references should be returned by reference"); ZEND_VM_C_GOTO(return_by_value); } } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 488027f933..99c344f3c1 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1590,7 +1590,7 @@ static int ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) { /* Not supposed to happen, but we'll allow it */ - zend_error(E_STRICT, "Only variable references should be returned by reference"); + zend_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } @@ -1606,7 +1606,7 @@ static int ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (IS_CONST == 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_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } } @@ -3999,7 +3999,7 @@ static int ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) { /* Not supposed to happen, but we'll allow it */ - zend_error(E_STRICT, "Only variable references should be returned by reference"); + zend_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } @@ -4015,7 +4015,7 @@ static int ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (IS_TMP_VAR == 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_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } } @@ -6929,7 +6929,7 @@ static int ZEND_RETURN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) { /* Not supposed to happen, but we'll allow it */ - zend_error(E_STRICT, "Only variable references should be returned by reference"); + zend_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } @@ -6945,7 +6945,7 @@ static int ZEND_RETURN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (IS_VAR == 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_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } } @@ -18976,7 +18976,7 @@ static int ZEND_RETURN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) { /* Not supposed to happen, but we'll allow it */ - zend_error(E_STRICT, "Only variable references should be returned by reference"); + zend_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } @@ -18992,7 +18992,7 @@ static int ZEND_RETURN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (IS_CV == 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_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } }