]> granicus.if.org Git - php/commitdiff
- Don't automatically call __toString() in convert_to_string_ex().
authorAndi Gutmans <andi@php.net>
Mon, 1 Dec 2003 11:47:52 +0000 (11:47 +0000)
committerAndi Gutmans <andi@php.net>
Mon, 1 Dec 2003 11:47:52 +0000 (11:47 +0000)
- use __toString() in your code.
- Keep the auto-case in make_printable_zval.

Zend/zend_operators.c

index 8a6f78e6456b9df029f29889f732f1198a850cc5..d26bee861e29a777573e14b689cf2674815a7c09 100644 (file)
@@ -492,6 +492,7 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC)
                        op->value.str.len = sizeof("Array")-1;
                        break;
                case IS_OBJECT: {
+#if ANDI_0
                        TSRMLS_FETCH();
                        if (op->value.obj.handlers->cast_object) {
                                if (op->value.obj.handlers->cast_object(op, op, IS_STRING, 1 TSRMLS_CC) == SUCCESS) {
@@ -501,6 +502,7 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC)
                        } else {
                                zend_error(E_NOTICE, "Object of class %s to string conversion", Z_OBJCE_P(op)->name);
                        }
+#endif
                        zval_dtor(op);
                        op->value.str.val = estrndup_rel("Object", sizeof("Object")-1);
                        op->value.str.len = sizeof("Object")-1;