[PHPTAL] repeat/item/start returns wrong value

2008-11-12 Thread romtek
Hi, According to the manual, repeat/item/start should return *true* if item is the first one. However, it returns 1 instead of true and 0 otherwise. In PHP, 1 is typecast to true, but relying on this creates a problem when working with elements' attributes in Javascript, which deals with strings.

Re: [PHPTAL] repeat/item/start returns wrong value

2008-11-12 Thread romtek
On Wed, Nov 12, 2008 at 5:35 AM, Kornel Lesiński <[EMAIL PROTECTED] > wrote: > On 12-11-2008 at 10:41:35 romtek <[EMAIL PROTECTED]> wrote: > > According to the manual, repeat/item/start should return *true* if item is >> the first one. However, it returns 1 instead of true and 0 otherwise. >> > >

Re: [PHPTAL] repeat/item/start returns wrong value

2008-11-12 Thread Kornel Lesiński
On 12-11-2008 at 10:41:35 romtek <[EMAIL PROTECTED]> wrote: According to the manual, repeat/item/start should return *true* if item is the first one. However, it returns 1 instead of true and 0 otherwise. In the code it's: case 'start': return $this->index === 0;