Well, 1/15 times the line of code gets executed. It could be an ajax
bug, but I doubt it, since my initial call to display the page is not
an ajax call. And after my first call I can inspect my cookies and the
first variable to be written never gets set.
On Sep 23, 11:39 am, Sir Tabs <[EMAIL PROTECTED]> wrote:
> I think I stumbled across a bug when using the Cookie->write method.
>
> Inside a controller I need to keep track of a date, so one of my
> method sets the cookie variable like this:
>
> $this->Cookie->write('month', $month, false);
> $this->Cookie->write('year', $year, false);
> $this->Cookie->write('day', $day, false);
> $this->Cookie->write('perspective', 'day', false);
>
> However, the first cookie ('month') never gets set if that is my only
> block of code. Debugging shows me that all 3 of the other variables
> are properly set, but never 'month'. However, if I set an extra,
> dummyVariable first:
>
> $this->Cookie->write('dummyCookie', 'Nothing meaningful',
> false);
>
> Then everything works out fine (and my 'dummyCookie' never gets set).
>
> I've tested this in both IE 7 and firefox 3, so I don't believe that
> it's a browser specific problem. I've also checked to make sure I
> didn't have hidden comments keeping the first line from being
> executed.
>
> I hope this either helps other people having the same problem, or
> someone more knowledgeable can tell me why this isn't bug, and maybe
> I'm just doing something wrong.
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---