mirror of
https://github.com/friendica/friendica
synced 2024-11-09 16:22:56 +00:00
Changes:
- let's at least log the error message, yes it does flood your logfile
This commit is contained in:
parent
1080a840f5
commit
a7651fa1d5
1 changed files with 3 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
namespace Friendica\Test\Util\Database;
|
||||
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DatabaseException;
|
||||
use PDO;
|
||||
|
@ -179,7 +180,8 @@ class StaticDatabase extends Database
|
|||
self::$staticConnection = @new ExtendedPDO($connect, $user, $pass);
|
||||
self::$staticConnection->setAttribute(PDO::ATTR_AUTOCOMMIT,0);
|
||||
} catch (PDOException $e) {
|
||||
/// @TODO At least log exception, don't ignore it!
|
||||
// Log exception
|
||||
Logger::error('Cannot establish database connection', ['exception' => $e, 'host' => $server, 'dbname' => $db]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue