From: Anatol Belski Date: Thu, 22 Sep 2016 09:49:35 +0000 (+0200) Subject: Fixed bug #73126 Cannot pass parameter 1 by reference X-Git-Tag: php-7.0.12RC1~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=579c8669c8b8b5646c576aea5b6b5c894ce485ff;p=php Fixed bug #73126 Cannot pass parameter 1 by reference --- diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index a477093311..5752a7d705 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -309,7 +309,6 @@ static union _zend_function *com_method_get(zend_object **object_ptr, zend_strin } f.num_args = bindptr.lpfuncdesc->cParams; - zend_set_function_arg_flags((zend_function*)&f); ITypeInfo_ReleaseFuncDesc(TI, bindptr.lpfuncdesc); break; @@ -335,15 +334,14 @@ static union _zend_function *com_method_get(zend_object **object_ptr, zend_strin } } - if (fptr) { - /* save this method in the cache */ - if (!obj->method_cache) { - ALLOC_HASHTABLE(obj->method_cache); - zend_hash_init(obj->method_cache, 2, NULL, function_dtor, 0); - } - - zend_hash_update_mem(obj->method_cache, name, &f, sizeof(f)); + zend_set_function_arg_flags((zend_function*)&f); + /* save this method in the cache */ + if (!obj->method_cache) { + ALLOC_HASHTABLE(obj->method_cache); + zend_hash_init(obj->method_cache, 2, NULL, function_dtor, 0); } + + zend_hash_update_mem(obj->method_cache, name, &f, sizeof(f)); } if (fptr) {