summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-14 03:09:34 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-14 03:09:34 +0000
commit22403c32775641e97a30543e8ab94cb2d9106d21 (patch)
treea455f812d3ae23ad79de524213590bf48a069e4d
parent9a028934e445a511086e1e204f42ca6e7ff59c79 (diff)
Fixed 500 error when trying to connect with bad GlobalDBH settings.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@571 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--LedgerSMB/Sysconfig.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/LedgerSMB/Sysconfig.pm b/LedgerSMB/Sysconfig.pm
index 4edf9c5f..89bd5839 100644
--- a/LedgerSMB/Sysconfig.pm
+++ b/LedgerSMB/Sysconfig.pm
@@ -95,7 +95,12 @@ $globalDBPassword = $config{globaldb}{DBPassword} if $config{globaldb}{DBPasswor
#putting this in an if clause for now so not to break other devel users
if ($config{globaldb}{DBConnect}){
- $GLOBALDBH = DBI->connect($globalDBConnect, $globalDBUserName, $globalDBPassword) or die;
+ $GLOBALDBH = DBI->connect($globalDBConnect, $globalDBUserName,
+ $globalDBPassword);
+ if (!$GLOBALDBH){
+ $form = new Form;
+ $form->error("No GlobalDBH Configured or Could not Connect");
+ }
}
# These lines prevent other apps in mod_perl from seeing the global db
# connection info