From 3e8dbb3e5d763166e6f03903c931161d5f2706ed Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 12 Jul 2016 14:58:13 +0200 Subject: [PATCH] Fixed bug #72569 DOTNET/COM array parameters broke in PHP7 --- ext/com_dotnet/com_variant.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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: -- 2.50.1