summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 4fea659469..0e3caeaeaa 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -140,7 +140,7 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC)
}
#define zendi_convert_scalar_to_number(op, holder, result) \
- if (op==result) { \
+ if (op==result || op->refcount == 0) { \
if (op->type != IS_LONG) { \
convert_scalar_to_number(op TSRMLS_CC); \
} \
@@ -194,7 +194,7 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC)
} while (0)
#define zendi_convert_to_long(op, holder, result) \
- if (op==result) { \
+ if (op == result || op->refcount == 0) { \
convert_to_long(op); \
} else if ((op)->type != IS_LONG) { \
switch ((op)->type) { \
@@ -230,7 +230,7 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC)
#define zendi_convert_to_boolean(op, holder, result) \
- if (op==result) { \
+ if (op==result || op->refcount == 0) { \
convert_to_boolean(op); \
} else if ((op)->type != IS_BOOL) { \
switch ((op)->type) { \