From: Marcus Boerger Date: Thu, 8 Feb 2007 12:30:40 +0000 (+0000) Subject: - Do not set is_ref/refcount for functions that return by reference X-Git-Tag: RELEASE_1_0_1~303 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f709c26072c01525d677712fecb3462858e2e694;p=php - Do not set is_ref/refcount for functions that return by reference --- diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index d77c49df25..ab01431b96 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1053,7 +1053,10 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS EG(scope) = EX(function_state).function->common.scope; } ((zend_internal_function *) EX(function_state).function)->handler(fci->param_count, *fci->retval_ptr_ptr, EX(function_state).function->common.return_reference?fci->retval_ptr_ptr:NULL, (fci->object_pp?*fci->object_pp:NULL), 1 TSRMLS_CC); - INIT_PZVAL(*fci->retval_ptr_ptr); + if (!EX(function_state).function->common.return_reference) + { + INIT_PZVAL(*fci->retval_ptr_ptr); + } } zend_ptr_stack_clear_multiple(TSRMLS_C); if (call_via_handler) {