From: Andi Gutmans Date: Sun, 2 May 2004 15:40:46 +0000 (+0000) Subject: - Fix comparison of two objects in non-compatibility mode. X-Git-Tag: RELEASE_0_1~307 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3317070941db45dc32e7e82bf55a54d9a997b2aa;p=php - Fix comparison of two objects in non-compatibility mode. --- diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 2694481403..1df4af3f88 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -328,12 +328,9 @@ ZEND_API void convert_to_long_base(zval *op, int base) if (ht) { retval = (zend_hash_num_elements(ht)?1:0); } - } else { - zend_error(E_NOTICE, "Object of class %s could not be converted to integer", Z_OBJCE_P(op)->name); + zval_dtor(op); + ZVAL_LONG(op, retval); } - - zval_dtor(op); - ZVAL_LONG(op, retval); break; } default: