Re: [SMARTY-DEV] foreach tag and objects
| From: | Boris Bezrukov | Date: | Mon, 10 Jan 2005 16:59:22 +0000 |
| Subject: | Re: [SMARTY-DEV] foreach tag and objects | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2604@lists.php.net to get a copy of this message | ||
Boris Bezrukov wrote:
Hello. Smarty does use (array)$from syntax within compiled {foreach} tag. I suppose that was introduced to avoid errors with $from in scalar data types? Is indeed comfortable for PHP4, but PHP5 had introduced iterators, so objects can now be used within foreach construct either. How do you think if it should be removed? Yep, it can be replaced with something like if(!is_object), but should it? Patch removing them attached. Thank you. Forgot to attach file.