]> granicus.if.org Git - php/commitdiff
Make references misuse emit E_NOTICE rather E_STRICT to be compatible with
authorIlia Alshanetsky <iliaa@php.net>
Mon, 11 Jul 2005 18:44:37 +0000 (18:44 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 11 Jul 2005 18:44:37 +0000 (18:44 +0000)
PHP 4.4.0

Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index 6c98299fdcabac0b3385e593eb0e4f94d9a09c09..f5e2e00d9b045014517b39437a8eaccd7a924643 100644 (file)
@@ -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);
                        }
                }
index 488027f933df8e88aeb45d5069f6dbac2d4d02ba..99c344f3c153e1d3f4f424605da0836ee56a0630 100644 (file)
@@ -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;
                        }
                }