mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Do not simply exit on DB connection error
This commit is contained in:
parent
e87f91c6d8
commit
5b5c785b19
1 changed files with 4 additions and 2 deletions
|
|
@ -67,7 +67,8 @@ class DBMysql extends DB
|
|||
$result = @mysql_connect($connection['host'], $connection['user'], $connection['pass']);
|
||||
if(!$result)
|
||||
{
|
||||
exit('Unable to connect to DB.');
|
||||
$this->setError(-1, 'Unable to connect to DB.');
|
||||
return;
|
||||
}
|
||||
|
||||
if(mysql_error())
|
||||
|
|
@ -164,7 +165,8 @@ class DBMysql extends DB
|
|||
{
|
||||
if(!$connection)
|
||||
{
|
||||
exit('Rhymix cannot handle DB connection.');
|
||||
$this->setError(-1, 'Unable to connect to DB.');
|
||||
return false;
|
||||
}
|
||||
// Run the query statement
|
||||
$result = @mysql_query($query, $connection);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue