]> granicus.if.org Git - php/commitdiff
- Fix comparison of two objects in non-compatibility mode.
authorAndi Gutmans <andi@php.net>
Sun, 2 May 2004 15:40:46 +0000 (15:40 +0000)
committerAndi Gutmans <andi@php.net>
Sun, 2 May 2004 15:40:46 +0000 (15:40 +0000)
Zend/zend_operators.c

index 2694481403badb0dfef510b49432a7e4fefd1c75..1df4af3f880d1b53fe13640b31ca2e535c1065dc 100644 (file)
@@ -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: