diff options
author | Andi Gutmans <andi@php.net> | 2004-10-29 00:55:11 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2004-10-29 00:55:11 +0000 |
commit | b86cdbbddb1936dd0cf3ace0ebc2193bd20c9c9f (patch) | |
tree | cb97a643c7d4c85ebbbf65e951715a1c724ca8d8 /Zend/zend_operators.c | |
parent | 11e64bafbcb7bf2bbb692d4b2eb59cfcae9b288d (diff) | |
download | php-git-b86cdbbddb1936dd0cf3ace0ebc2193bd20c9c9f.tar.gz |
- For Ilia:
- MFH: Fixed bug #30572 (crash when comparing SimpleXML attribute to a boolean).
- Hope this works well. I will MFH tomorrow if no one complains.
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r-- | Zend/zend_operators.c | 6 |
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) { \ |