From 3fbdd1d75adc88827d8ef330d6a762b8bbe47687 Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Mon, 5 May 2014 12:08:11 +0700 Subject: [PATCH] do not crash on 404 --- classes/Kohana/Debugtoolbar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Kohana/Debugtoolbar.php b/classes/Kohana/Debugtoolbar.php index ca4b365..d302f9b 100644 --- a/classes/Kohana/Debugtoolbar.php +++ b/classes/Kohana/Debugtoolbar.php @@ -566,7 +566,7 @@ abstract class Kohana_Debugtoolbar { return FALSE; } - if ( ! empty($config->excluded_routes) && in_array(Route::name(Request::initial()->route()), $config->excluded_routes)) + if ( ! empty($config->excluded_routes) && !is_null(Request::initial()->route()) && in_array(Route::name(Request::initial()->route()), $config->excluded_routes)) { return FALSE; }