Created
August 17, 2012 07:54
-
-
Save notomato/3376832 to your computer and use it in GitHub Desktop.
Make sure you return on redirect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Make sure you return on redirect, not do this: | |
class PostsController extends Base { | |
public function view($post) { | |
if (!$post) { | |
$this->redirect("Posts::index"); | |
} | |
// Herp derp | |
} | |
} | |
// source: http://www.slideshare.net/nateabele/the-state-of-lithium |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment