summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-07-18 18:36:24 +0200
committerAndrey Andreev <narf@devilix.net>2013-07-18 18:36:24 +0200
commitf46b16b096fd4861486138b604a29ba19c0cda88 (patch)
treea38415cd2d7a0eb9776b6ce964c47bcb13f136d5
parent6a3d7e50ce761570d88d82f96039304020f315bd (diff)
More verbose error messages for incorrect/missing database groups (based on PR #2040)
-rw-r--r--system/database/DB.php8
1 files changed, 6 insertions, 2 deletions
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];