Hi,

While working with switchTo() I noticed this behavior:

echo sfContext::getInstance()->getConfiguration()->getApplication().'-'.
     sfProjectConfiguration::getActive()->getApplication() . PHP_EOL;

sfContext::switchTo('frontend');
echo sfContext::getInstance()->getConfiguration()->getApplication().'-'.
     sfProjectConfiguration::getActive()->getApplication() . PHP_EOL;

sfContext::switchTo('backend');
echo sfContext::getInstance()->getConfiguration()->getApplication().'-'.
     sfProjectConfiguration::getActive()->getApplication() . PHP_EOL;


The output of this is:

backend-backend
frontend-frontend
backend-frontend <- relevant bit

My goal was to delete cross application cache elements and that works fine. But following calls to the application configuration class will not (eg: think along the lines of getFrontendRouting() methods here [1]).

I'm aware that there are many caveats on using sfContext::switchTo(), but I'm wondering if this is expected or if it's a bug?


Cheers,
Paulo



[1]http://www.symfony-project.org/blog/2009/02/17/cross-application-links

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" 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/symfony-devs?hl=en

Reply via email to