]> granicus.if.org Git - php/commitdiff
ws
authorStanislav Malyshev <stas@php.net>
Thu, 18 Oct 2007 20:44:41 +0000 (20:44 +0000)
committerStanislav Malyshev <stas@php.net>
Thu, 18 Oct 2007 20:44:41 +0000 (20:44 +0000)
Zend/zend_object_handlers.c

index b71df7c8ecae9a02a419ea09dced2faad8039faa..794d78fd27fa19a5b59db02da7c9ad1f388c1982 100644 (file)
@@ -1130,14 +1130,14 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty
                case IS_STRING:
                        ce = Z_OBJCE_P(readobj);
                        if (ce->__tostring &&
-                (zend_call_method_with_0_params(&readobj, ce, &ce->__tostring, "__tostring", &retval) || EG(exception))) {
-                if (EG(exception)) {
-                       if (retval) {
-                               zval_ptr_dtor(&retval);
-                       }
+                               (zend_call_method_with_0_params(&readobj, ce, &ce->__tostring, "__tostring", &retval) || EG(exception))) {
+                               if (EG(exception)) {
+                                       if (retval) {
+                                               zval_ptr_dtor(&retval);
+                                       }
                                        zend_error(E_ERROR, "Method %s::__toString() must not throw an exception", ce->name);
-                       return FAILURE;
-                }
+                                       return FAILURE;
+                               }
                                if (Z_TYPE_P(retval) == IS_STRING) {
                                        INIT_PZVAL(writeobj);
                                        ZVAL_ZVAL(writeobj, retval, 1, 1);