summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2014-05-24 21:37:15 +0800
committerXinchen Hui <laruence@php.net>2014-05-24 21:37:15 +0800
commitb87cff66b871177c50317ede21cdd1c93250d28a (patch)
tree3250d39b9e9cb8c9b2e9c520eda7530169a76035
parent60e01e5d643056c9320de2ea2ee3f5396038b50e (diff)
downloadphp-git-b87cff66b871177c50317ede21cdd1c93250d28a.tar.gz
fci->retval is always set
-rw-r--r--Zend/zend_execute_API.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 15f79738e6..9459344df6 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -857,10 +857,10 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
EG(active_op_array) = (zend_op_array *) EX(function_state).function;
original_opline_ptr = EG(opline_ptr);
- if (EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) {
- zend_generator_create_zval(EG(active_op_array), fci->retval TSRMLS_CC);
- } else {
+ if (EXPECTED((EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) == 0)) {
zend_execute(EG(active_op_array), fci->retval TSRMLS_CC);
+ } else {
+ zend_generator_create_zval(EG(active_op_array), fci->retval TSRMLS_CC);
}
EG(active_op_array) = original_op_array;
@@ -885,9 +885,9 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
because it can break proper ones (Bug #34045)
if (!EX(function_state).function->common.return_reference)
{
- INIT_PZVAL(*fci->retval_ptr_ptr);
+ INIT_PZVAL(*f);
}*/
- if (EG(exception) && fci->retval) {
+ if (EG(exception)) {
zval_ptr_dtor(fci->retval);
ZVAL_UNDEF(fci->retval);
}
@@ -911,7 +911,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
}
efree(EX(function_state).function);
- if (EG(exception) && fci->retval) {
+ if (EG(exception)) {
zval_ptr_dtor(fci->retval);
ZVAL_UNDEF(fci->retval);
}