]> granicus.if.org Git - php/commitdiff
- MF44: Problems with user defined error handler and references
authorDerick Rethans <derick@php.net>
Tue, 7 Jun 2005 10:01:30 +0000 (10:01 +0000)
committerDerick Rethans <derick@php.net>
Tue, 7 Jun 2005 10:01:30 +0000 (10:01 +0000)
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index ad5c2d4e7c133c111be417884a8a992b38f371b9..a876a10a47f060694509de94645dfa945a3f0fc3 100644 (file)
@@ -1376,10 +1376,10 @@ ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV)
            !(*value_ptr_ptr)->is_ref &&
            opline->extended_value == ZEND_RETURNS_FUNCTION && 
            !EX_T(opline->op2.u.var).var.fcall_returned_reference) {
-               zend_error(E_STRICT, "Only variables should be assigned by reference");
                if (free_op2.var == NULL) {
                        PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
                }
+               zend_error(E_STRICT, "Only variables should be assigned by reference");
                ZEND_VM_DISPATCH_TO_HANDLER(ZEND_ASSIGN);
        }
 
index 689e0e6157c6558347a4e940f25f419c5217966c..719d206fe26a11b52926c54ee4c104e868c70764 100644 (file)
@@ -11674,10 +11674,10 @@ static int ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
            !(*value_ptr_ptr)->is_ref &&
            opline->extended_value == ZEND_RETURNS_FUNCTION && 
            !EX_T(opline->op2.u.var).var.fcall_returned_reference) {
-               zend_error(E_STRICT, "Only variables should be assigned by reference");
                if (free_op2.var == NULL) {
                        PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
                }
+               zend_error(E_STRICT, "Only variables should be assigned by reference");
                return ZEND_ASSIGN_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
        }
 
@@ -13500,10 +13500,10 @@ static int ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
            !(*value_ptr_ptr)->is_ref &&
            opline->extended_value == ZEND_RETURNS_FUNCTION && 
            !EX_T(opline->op2.u.var).var.fcall_returned_reference) {
-               zend_error(E_STRICT, "Only variables should be assigned by reference");
                if (free_op2.var == NULL) {
                        PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
                }
+               zend_error(E_STRICT, "Only variables should be assigned by reference");
                return ZEND_ASSIGN_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
        }
 
@@ -23590,10 +23590,10 @@ static int ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
            !(*value_ptr_ptr)->is_ref &&
            opline->extended_value == ZEND_RETURNS_FUNCTION && 
            !EX_T(opline->op2.u.var).var.fcall_returned_reference) {
-               zend_error(E_STRICT, "Only variables should be assigned by reference");
                if (free_op2.var == NULL) {
                        PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
                }
+               zend_error(E_STRICT, "Only variables should be assigned by reference");
                return ZEND_ASSIGN_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
        }
 
@@ -25416,10 +25416,10 @@ static int ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
            !(*value_ptr_ptr)->is_ref &&
            opline->extended_value == ZEND_RETURNS_FUNCTION && 
            !EX_T(opline->op2.u.var).var.fcall_returned_reference) {
-               zend_error(E_STRICT, "Only variables should be assigned by reference");
                if (free_op2.var == NULL) {
                        PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
                }
+               zend_error(E_STRICT, "Only variables should be assigned by reference");
                return ZEND_ASSIGN_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
        }
 
@@ -31054,10 +31054,10 @@ static int ZEND_ASSIGN_REF_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
            !(*value_ptr_ptr)->is_ref &&
            opline->extended_value == ZEND_RETURNS_FUNCTION && 
            !EX_T(opline->op2.u.var).var.fcall_returned_reference) {
-               zend_error(E_STRICT, "Only variables should be assigned by reference");
                if (free_op2.var == NULL) {
                        PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
                }
+               zend_error(E_STRICT, "Only variables should be assigned by reference");
                return ZEND_ASSIGN_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
        }