diff options
author | Filipp Lepalaan <filipp@mekanisti.fi> | 2009-11-05 21:32:42 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mekanisti.fi> | 2009-11-05 21:32:42 +0200 |
commit | d07ac0a8be78fa69b9c874576dcff547a02a6523 (patch) | |
tree | f44df613ae091cc03400f1ae360223254f78833c /App.php | |
parent | efbacb9717eb28209c0362c84b293653915fb453 (diff) | |
download | main-d07ac0a8be78fa69b9c874576dcff547a02a6523.tar.gz main-d07ac0a8be78fa69b9c874576dcff547a02a6523.tar.bz2 main-d07ac0a8be78fa69b9c874576dcff547a02a6523.zip |
Error on invalid config key
Diffstat (limited to 'App.php')
-rw-r--r-- | App.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; } |