Re: A bug in section loop
| From: | Andrei Zmievski | Date: | Mon, 16 Jul 2001 15:18:34 +0000 |
| Subject: | Re: A bug in section loop | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1168@lists.php.net to get a copy of this message | ||
On Mon, 16 Jul 2001, TrashCan T2 wrote:
> I find a bug when using {section} in the template.
>
> when the key of loop array is not continuous (ex. ary[0],
> ary[1],ary[3].....,ary[8])
>
> the output using section will not be correct.
> It will generate an additional row that contains no data with
> {$ary[loop_sec]}.
>
>
> The condition that key of array is not continuous will happen when using
> unset() or array_diff().
>
> ps. the Smarty version is 1.4.3, the php version is 4.0.6
The arrays you are looping through with {section} are supposed to be
contiguous.
-Andrei
* George Orwell was an optimist. *