"fixed fatal error \"Exception thrown without a stack frame in Unknown on line 0\", if DB does not exist when calling setup"

This commit is contained in:
Ralf Becker 2008-04-01 09:16:03 +00:00
parent 12f7232ee2
commit 1ab52586bd

View File

@ -97,14 +97,20 @@ class setup
$GLOBALS['egw_info']['server']['db_persistent'] = False; $GLOBALS['egw_info']['server']['db_persistent'] = False;
} }
$GLOBALS['egw']->db = $this->db = new egw_db(); $GLOBALS['egw']->db = $this->db = new egw_db();
$this->db->connect(
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_name'], try {
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_host'], $this->db->connect(
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_port'], $GLOBALS['egw_domain'][$this->ConfigDomain]['db_name'],
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_user'], $GLOBALS['egw_domain'][$this->ConfigDomain]['db_host'],
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_pass'], $GLOBALS['egw_domain'][$this->ConfigDomain]['db_port'],
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_type'] $GLOBALS['egw_domain'][$this->ConfigDomain]['db_user'],
); $GLOBALS['egw_domain'][$this->ConfigDomain]['db_pass'],
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_type']
);
}
catch (Exception $e) {
return;
}
$this->db->set_app('phpgwapi'); $this->db->set_app('phpgwapi');
if ($connect_and_setcharset) if ($connect_and_setcharset)