com php-src: Implicit return should be always on the last line of a function: Zend/zend_compile.c
| From: | Bob Weinand | Date: | Fri, 31 Jul 2015 00:44:42 +0000 |
| Subject: | com php-src: Implicit return should be always on the last line of a function: Zend/zend_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88249@lists.php.net to get a copy of this message | ||
Commit: ac87657d4219111ecc52f2b6f27f5a739f0379a3
Author: Bob Weinand <bobwei9@hotmail.com> Fri, 31 Jul 2015 02:44:42 +0200
Parents: 36aa92a67ddeaa73754274b05f0ed35006b18ebc
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ac87657d4219111ecc52f2b6f27f5a739f0379a3
Log:
Implicit return should be always on the last line of a function
Changed paths:
M Zend/zend_compile.c
Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index f6d9e52..5d7eec2 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);