hey there..

so, with cake 1.2 final I've been struggling with a strange "bug" in
our application. we have quite a few components that are accessed from
the app_controller beforeFilter method. Some of our components rely on
other components (so withone one, it may be accessing $this-
>controller->Session). This was causing an error after upgrading
because it wasn't able to access $controller, despite having it
instantiated in the component's startup method.

Some more digging shows that the component startups are not actually
called until after beforeFilter. So, I can't really use $this-
>controller from within a component that is operating in beforeFilter
(unless I manually call the startup method). However, I have also
discovered that a component's "initialize" method IS run before
'beforeFilter' (right when its created, I believe).

So far swapping my 'startup' methods over to 'initialize' (in the
components) hasn't caused any problems but I wanted to toss this out
there to see if this is a good idea or if there is something terribly
bad that I'm overlooking with this change.

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to