summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-07-31 02:44:42 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-07-31 02:44:42 +0200
commitac87657d4219111ecc52f2b6f27f5a739f0379a3 (patch)
tree9683cc4c74fd1db3e28247a25d3e2e2fdec670ca /Zend/zend_compile.c
parent36aa92a67ddeaa73754274b05f0ed35006b18ebc (diff)
downloadphp-git-ac87657d4219111ecc52f2b6f27f5a739f0379a3.tar.gz
Implicit return should be always on the last line of a function
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index f6d9e52777..5d7eec2412 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -4848,6 +4848,9 @@ void zend_compile_func_decl(znode *result, zend_ast *ast) /* {{{ */
CG(active_class_entry), (zend_function *) op_array, E_COMPILE_ERROR);
}
+ /* put the implicit return on the really last line */
+ CG(zend_lineno) = decl->end_lineno;
+
zend_do_extended_info();
zend_emit_final_return(NULL);