From 575dafe60a46e8022e25edafd65ac81219333e2e Mon Sep 17 00:00:00 2001 From: phpnut Date: Tue, 24 Apr 2007 00:26:10 +0000 Subject: [PATCH] Fixing error when using AuthComponent and DEBUG < 1 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4879 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/controller/components/auth.php | 5 ++++- cake/libs/debugger.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index d5eccd4c5..0f423486a 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -232,7 +232,10 @@ class AuthComponent extends Object { CAKE_ADMIN . '_delete' => 'delete' )); } - Debugger::checkSessionKey(); + if(Configure::read() > 0) { + uses('debugger'); + Debugger::checkSessionKey(); + } } /** * Main execution method. Handles redirecting of invalid users, and processing diff --git a/cake/libs/debugger.php b/cake/libs/debugger.php index e7f3a8de9..49f6a64d4 100644 --- a/cake/libs/debugger.php +++ b/cake/libs/debugger.php @@ -191,10 +191,10 @@ class Debugger extends Object { if (Configure::read('log')) { CakeLog::write($level, "{$error} ({$code}): {$description} in [{$file}, line {$line}]"); } - + if ($error == 'Fatal Error') { die(); - } + } return true; } /**