Symfony redirect throws an sfStopException so don't wrap the redirect in a try catch

This is a strange one but when in an action and you call the symfony redirect, $this->redirect(module/action), symfony will redirect and also throw an sfStopException exception!
Here's a link with more

We had the redirect call within a try catch and thus the symfony exception was caught (which is not what we wanted).
The fix was to move the redirect call outside the try catch, another option in the post is to call $this->getController()->redirect()

Comments

Popular posts from this blog

deep dive into Material UI TextField built by mui

angular js protractor e2e cheatsheet

react-router v6.4+ loaders, actions, forms and more