On 25 abr, 08:30, Sergei <[EMAIL PROTECTED]> wrote:
> Have to reply to myself again.
>
> I was using $this->Session->check('User') from __construct function.
> Seems like helpers are not available in helper constructors. But why?
The answer to your question is pretty much IN the question: You
shouldn't be overriding the constructor method.
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/view/view.php#L866
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/view/view.php#L880
(same for 1.1 of course)
Probably easiest solved by creating an init method and call it as the
first line of each method, skipping if it's already been run.
hth,
AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---