summaryrefslogtreecommitdiff
path: root/Zend/zend.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend.h')
-rw-r--r--Zend/zend.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/Zend/zend.h b/Zend/zend.h
index 4d212c5e1f..44266c29ce 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -711,9 +711,11 @@ END_EXTERN_C()
#define COPY_PZVAL_TO_ZVAL(zv, pzv) \
ZVAL_COPY_VALUE(&(zv), (pzv)); \
- if (Z_REFCOUNT_P(pzv)>1) { \
- zval_copy_ctor(&(zv)); \
- Z_DELREF_P((pzv)); \
+ if (IS_REFCOUNTED(Z_TYPE_P(pzv))) { \
+ if (Z_REFCOUNT_P(pzv)>1) { \
+ zval_copy_ctor(&(zv)); \
+ Z_DELREF_P((pzv)); \
+ } \
} \
#define REPLACE_ZVAL_VALUE(ppzv_dest, pzv_src, copy) { \