summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2007-10-18 20:44:41 +0000
committerStanislav Malyshev <stas@php.net>2007-10-18 20:44:41 +0000
commit988d28cc13e82ad791cf4449f839ac1b5df3d3ec (patch)
tree4897dec543805131f96c28383ecbc09e274712b0 /Zend
parent3fa7ec850833df0ff69208ca58d6db2ca22f6290 (diff)
downloadphp-git-988d28cc13e82ad791cf4449f839ac1b5df3d3ec.tar.gz
ws
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend_object_handlers.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index b71df7c8ec..794d78fd27 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -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);