From d07ac0a8be78fa69b9c874576dcff547a02a6523 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Thu, 5 Nov 2009 21:32:42 +0200 Subject: Error on invalid config key --- App.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/App.php b/App.php index f62a9ef..6eb9a24 100644 --- a/App.php +++ b/App.php @@ -25,7 +25,8 @@ class App } if (!$controller) { - $controller = "user"; + $dc = self::conf("defaults.route"); + $controller = $dc; } ob_start(); @@ -76,6 +77,9 @@ class App $cpath = realpath("../system/config.ini"); $config = parse_ini_file($cpath, true); $config = $config['development']; + if ($key && ! $config[$key]) { + return self::error("No such config key: $key"); + } return ($key) ? $config[$key] : $config; } -- cgit v1.2.3