use Friendica\Core\Config\Cache\ConfigCache;
use Friendica\Core\System;
+use Friendica\Network\HTTPException\InternalServerErrorException;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Profiler;
use mysqli;
$this->connection->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$this->connected = true;
} catch (PDOException $e) {
- /// @TODO At least log exception, don't ignore it!
+ $this->connected = false;
}
}
// We are having an own error logging in the function "e"
$called_from_e = ($called_from['function'] == 'e');
+ if (!isset($this->connection)) {
+ throw new InternalServerErrorException('The Connection is empty, although connected is set true.');
+ }
+
switch ($this->driver) {
case 'pdo':
// If there are no arguments we use "query"