1
0
Fork 0
- let's at least log the error message, yes it does flood your logfile
This commit is contained in:
Roland Häder 2022-06-21 13:21:33 +02:00
parent 1080a840f5
commit a7651fa1d5
Signed by: roland
GPG key ID: C82EDE5DDFA0BA77

View file

@ -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]);
}
}