Index: trunk/core/kernel/startup.php =================================================================== diff -u -N -r4758 -r4762 --- trunk/core/kernel/startup.php (.../startup.php) (revision 4758) +++ trunk/core/kernel/startup.php (.../startup.php) (revision 4762) @@ -69,14 +69,15 @@ $debugger_start = getmicrotime(); include_once(KERNEL_PATH.'/utility/debugger.php'); $debugger_end = getmicrotime(); - - $debugger->profileStart('inc_globals', KERNEL_PATH.'/globals.php', $globals_start); - $debugger->profileFinish('inc_globals', KERNEL_PATH.'/globals.php', $globals_end); - $debugger->profilerAddTotal('includes', 'inc_globals'); - - $debugger->profileStart('inc_debugger', KERNEL_PATH.'/utility/debugger.php', $debugger_start); - $debugger->profileFinish('inc_debugger', KERNEL_PATH.'/utility/debugger.php', $debugger_end); - $debugger->profilerAddTotal('includes', 'inc_debugger'); + if (isset($debugger)) { + $debugger->profileStart('inc_globals', KERNEL_PATH.'/globals.php', $globals_start); + $debugger->profileFinish('inc_globals', KERNEL_PATH.'/globals.php', $globals_end); + $debugger->profilerAddTotal('includes', 'inc_globals'); + + $debugger->profileStart('inc_debugger', KERNEL_PATH.'/utility/debugger.php', $debugger_start); + $debugger->profileFinish('inc_debugger', KERNEL_PATH.'/utility/debugger.php', $debugger_end); + $debugger->profilerAddTotal('includes', 'inc_debugger'); + } } } @@ -101,7 +102,7 @@ k4_include_once($a_file); } - if (defined('DEBUG_MODE') && DEBUG_MODE) { + if (defined('DEBUG_MODE') && DEBUG_MODE && isset($debugger)) { $debugger->AttachToApplication(); }