diff options
author | Anatol Belski <ab@php.net> | 2016-07-12 14:58:13 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-07-12 14:58:50 +0200 |
commit | 3e8dbb3e5d763166e6f03903c931161d5f2706ed (patch) | |
tree | 8b9dfd4dfdac16083eead34503feea10548b6b88 | |
parent | 5fbcc2b90f6245cf1c20d41d2cd07fde711ccadd (diff) | |
download | php-git-3e8dbb3e5d763166e6f03903c931161d5f2706ed.tar.gz |
Fixed bug #72569 DOTNET/COM array parameters broke in PHP7
-rw-r--r-- | ext/com_dotnet/com_variant.c | 7 |
1 files changed, 6 insertions, 1 deletions
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: |