diff --git a/src/Database/Adapter/SQL.php b/src/Database/Adapter/SQL.php index e6479e1f5..c2907b88d 100644 --- a/src/Database/Adapter/SQL.php +++ b/src/Database/Adapter/SQL.php @@ -1433,7 +1433,11 @@ public static function getPDOAttributes(): array public function getHostname(): string { - return $this->pdo->getHostname(); + try { + return $this->pdo->getHostname(); + } catch (\Throwable) { + return ''; + } } /**