CakePHP 1.2: redirect method


Previously (in CakePHP 1.1) it was best to add an exit or return after you redirect method like:

$this->redirect('controller/action');
exit();

or

$this->redirect('controller/action');
return();

in CakePHP 1.2 this can be shortened to:

$this->redirect('controller/action', null, true);

See cakebaker on this too.

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts
CakePHP 1.2: $html->link with html or image.
I want to be six again

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

Thnx, simple documentation is sometimes hard to find.