Re: cvs: php-src(PHP_5_3) /ext/spl spl_iterators.c

From: Date: Wed, 30 Jul 2008 00:46:38 +0000
Subject: Re: cvs: php-src(PHP_5_3) /ext/spl spl_iterators.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-51744@lists.php.net to get a copy of this message
Hello Dmitry, please revert. An array has no natural string representation. So we do want the message here as much as we see it in comparable situations. This is a design decision, I actually played with yout version and did not like it really. marcus Tuesday, July 29, 2008, 1:50:05 PM, you wrote: > dmitry Tue Jul 29 11:50:05 2008 UTC > Modified files: (Branch: PHP_5_3) > /php-src/ext/spl spl_iterators.c > Log: > Removed warning > > > > http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.30.2.28.2.10&r2=1.73.2.30.2.28.2.11&diff_format=u > Index: php-src/ext/spl/spl_iterators.c > diff -u php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.10 > php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.11 > --- php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.10 Sat Jul 19 19:45:55 2008 > +++ php-src/ext/spl/spl_iterators.c Tue Jul 29 11:50:05 2008 > @@ -16,7 +16,7 @@ > > +----------------------------------------------------------------------+ > */ > > -/* $Id: spl_iterators.c,v 1.73.2.30.2.28.2.10 2008/07/19 19:45:55 colder Exp $ */ > +/* $Id: spl_iterators.c,v 1.73.2.30.2.28.2.11 2008/07/29 11:50:05 dmitry Exp $ */ > > #ifdef HAVE_CONFIG_H > # include "config.h" > @@ -924,7 +924,12 @@ > > php_set_error_handling(EH_THROW, spl_ce_UnexpectedValueException TSRMLS_CC); > RETVAL_ZVAL(*data, 1, 0); > - convert_to_string(return_value); > + if (Z_TYPE_P(return_value) == IS_ARRAY) { > + zval_dtor(return_value); > + ZVAL_STRINGL(return_value, "Array", sizeof("Array")-1, 1); > + } else { > + convert_to_string(return_value); > + } > php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); > } > Best regards, Marcus

« previous php.cvs (#51744) next »