projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36aa92a
)
Implicit return should be always on the last line of a function
author
Bob Weinand
<bobwei9@hotmail.com>
Fri, 31 Jul 2015 00:44:42 +0000
(
02:44
+0200)
committer
Bob Weinand
<bobwei9@hotmail.com>
Fri, 31 Jul 2015 00:44:42 +0000
(
02:44
+0200)
Zend/zend_compile.c
patch
|
blob
|
history
diff --git
a/Zend/zend_compile.c
b/Zend/zend_compile.c
index f6d9e5277777b2d75170e6ed72453d4e7a14a950..5d7eec2412cd66b74e64f44112a94bf03dd3bba5 100644
(file)
--- 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);