From f46b16b096fd4861486138b604a29ba19c0cda88 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 18 Jul 2013 19:36:24 +0300 Subject: More verbose error messages for incorrect/missing database groups (based on PR #2040) --- system/database/DB.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'system/database/DB.php') diff --git a/system/database/DB.php b/system/database/DB.php index 83d973304..8742800c8 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -76,9 +76,13 @@ function &DB($params = '', $query_builder_override = NULL) $active_group = $params; } - if ( ! isset($active_group) OR ! isset($db[$active_group])) + if ( ! isset($active_group)) { - show_error('You have specified an invalid database connection group.'); + show_error('You have not specified a database connection group via $active_group in your config/database.php file.'); + } + elseif ( ! isset($db[$active_group])) + { + show_error('You have specified an invalid database connection group ('.$active_group.') in your config/database.php file.'); } $params = $db[$active_group]; -- cgit v1.2.3-24-g4f1b