diff options
| author | Nikita Popov <nikic@php.net> | 2016-06-10 15:57:18 +0200 |
|---|---|---|
| committer | Nikita Popov <nikic@php.net> | 2016-06-10 15:57:18 +0200 |
| commit | 792e89385ca6fc722a03590722eb7745a2374720 (patch) | |
| tree | afc5bb12434e3a462f8e3fd331ecd31abb7ed3ea /Zend/zend_compile.c | |
| parent | 33f6fc1790358883873b2b894d2b4af801f374fc (diff) | |
| download | php-git-792e89385ca6fc722a03590722eb7745a2374720.tar.gz | |
Fixed bug #72373
Diffstat (limited to 'Zend/zend_compile.c')
| -rw-r--r-- | Zend/zend_compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 30d28cd842..2b935a8f4d 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2329,7 +2329,8 @@ void zend_emit_final_return(int return_one) /* {{{ */ zend_op *ret; zend_bool returns_reference = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0; - if (CG(active_op_array)->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) { + if (CG(active_op_array)->fn_flags & ZEND_ACC_HAS_RETURN_TYPE + && !(CG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR)) { zend_emit_return_type_check(NULL, CG(active_op_array)->arg_info - 1, 1); } |
