From: Anatol Belski Date: Tue, 12 Jul 2016 12:58:13 +0000 (+0200) Subject: Fixed bug #72569 DOTNET/COM array parameters broke in PHP7 X-Git-Tag: php-7.1.0beta1~93^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e8dbb3e5d763166e6f03903c931161d5f2706ed;p=php Fixed bug #72569 DOTNET/COM array parameters broke in PHP7 --- diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 6a5dc9dacb..cae992dbb7 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -100,7 +100,12 @@ PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codep { OLECHAR *olestring; php_com_dotnet_object *obj; - zend_uchar ztype = (z == NULL ? IS_NULL : Z_TYPE_P(z)); + zend_uchar ztype = IS_NULL; + + if (z) { + ZVAL_DEREF(z); + ztype = Z_TYPE_P(z); + } switch (ztype) { case IS_NULL: