Fixing undefined variable in first if block branch, fixes #5921

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7954 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-12-24 05:40:05 +00:00
parent b063f22f31
commit d5b157ed94

View file

@ -673,7 +673,8 @@ class AuthComponent extends Object {
*/
function redirect($url = null) {
if (!is_null($url)) {
$this->Session->write('Auth.redirect', $url);
$redir = $url;
$this->Session->write('Auth.redirect', $redir);
} elseif ($this->Session->check('Auth.redirect')) {
$redir = $this->Session->read('Auth.redirect');
$this->Session->delete('Auth.redirect');