mirror of
https://github.com/php/php-src.git
synced 2026-04-05 07:02:33 +02:00
Make references misuse emit E_NOTICE rather E_STRICT to be compatible with
PHP 4.4.0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user