Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_0) / zend_object_handlers.c

From: Date: Sat, 19 Mar 2005 20:17:01 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_0) / zend_object_handlers.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3515@lists.php.net to get a copy of this message
In-Reply-To: <cvshelly1111246700@cvsserver> Message-ID: <Pine.LNX.4.61.0503192216350.23359@arfg.argcubovn.sv> References: <cvshelly1111246700@cvsserver> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed MFH what exactly? Please be more verbose with commit messages. --Jani On Sat, 19 Mar 2005, Marcus Boerger wrote: > helly Sat Mar 19 10:38:20 2005 EDT > > Modified files: (Branch: PHP_5_0) > /ZendEngine2 zend_object_handlers.c > Log: > - MFH > > ±Ä±–ýõ > ‡Eí*ñåhttp://cvs.php.net/diff.php/ZendEngine2/zend_object_handlers.c?r1=1.101.2.6&r2=1.101.2.7&ty=u > Index: ZendEngine2/zend_object_handlers.c > diff -u ZendEngine2/zend_object_handlers.c:1.101.2.6 > ZendEngine2/zend_object_handlers.c:1.101.2.7 > --- ZendEngine2/zend_object_handlers.c:1.101.2.6 Sat Mar 19 10:14:49 2005 > +++ ZendEngine2/zend_object_handlers.c Sat Mar 19 10:38:19 2005 > @@ -17,7 +17,7 @@ > +----------------------------------------------------------------------+ > */ > > -/* $Id: zend_object_handlers.c,v 1.101.2.6 2005/03/19 15:14:49 helly Exp $ */ > +/* $Id: zend_object_handlers.c,v 1.101.2.7 2005/03/19 15:38:19 helly Exp $ */ > > #include "zend.h" > #include "zend_globals.h" > @@ -108,7 +108,7 @@ > zval *retval = NULL; > zval __set_name; > int call_result; > - int ret; > + int result; > > /* __set handler is called with two arguments: > property name > @@ -146,17 +146,13 @@ > zval_ptr_dtor(&member); > zval_ptr_dtor(&value); > > - if (retval && zend_is_true(retval)) { > - ret = SUCCESS; > - } else { > - ret = FAILURE; > - } > - > if (retval) { > + result = i_zend_is_true(retval) ? SUCCESS : FAILURE; > zval_ptr_dtor(&retval); > + return result; > + } else { > + return FAILURE; > } > - > - return ret; > } > > > @@ -442,9 +438,13 @@ > SEPARATE_ARG_IF_REF(offset); > zend_call_method_with_1_params(&object, ce, NULL, "offsetexists", &retval, > offset); > zval_ptr_dtor(&offset); > - result = i_zend_is_true(retval); > - zval_ptr_dtor(&retval); > - return result; > + if (retval) { > + result = i_zend_is_true(retval); > + zval_ptr_dtor(&retval); > + return result; > + } else { > + return 0; > + } > } else { > zend_error(E_ERROR, "Cannot use object of type %s as array", ce->name); > return 0; > @@ -798,7 +798,10 @@ > #endif > > if (!zend_verify_property_access(property_info, ce TSRMLS_CC)) { > - zend_error(E_ERROR, "Cannot access %s property %s::$%s", > zend_visibility_string(property_info->flags), ce->name, property_name); > + if (!silent) { > + zend_error(E_ERROR, "Cannot access %s property %s::$%s", > zend_visibility_string(property_info->flags), ce->name, property_name); > + } > + return NULL; > } > > zend_hash_quick_find(tmp_ce->static_members, property_info->name, > property_info->name_length+1, property_info->h, (void **) &retval); > >

« previous php.zend-engine.cvs (#3515) next »