forked from extern/egroupware
"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:
parent
12f7232ee2
commit
1ab52586bd
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user