]> granicus.if.org Git - php/commitdiff
- Restore E_NOTICE for longs and doubles.
authorAndi Gutmans <andi@php.net>
Mon, 15 Mar 2004 16:55:20 +0000 (16:55 +0000)
committerAndi Gutmans <andi@php.net>
Mon, 15 Mar 2004 16:55:20 +0000 (16:55 +0000)
Zend/zend_operators.c

index aa0596c54b8f6d0a7649ac722acc44f148b1ade2..412c3e529f34c9611b9ca012bca8d6db873ae424 100644 (file)
@@ -314,6 +314,8 @@ 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);
@@ -381,6 +383,8 @@ ZEND_API void convert_to_double(zval *op)
                                                if (ht) {
                                                        retval = (zend_hash_num_elements(ht)?1.0:0.0);
                                                }
+                                       } else {
+                                               zend_error(E_NOTICE, "Object of class %s could not be converted to double", Z_OBJCE_P(op)->name);
                                        }
 
                                        zval_dtor(op);