From b141343bcdff3b992ed95e8106002ec54020d81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Sch=C3=BCttl=C3=B6ffel?= <schuettloeffel@zqs.uni-hannover.de> Date: Mon, 16 Dec 2024 09:27:31 +0000 Subject: [PATCH] Resolve "Meldung bei fehlender Datenbankverbindung anpassen" Closes #5012 Merge request studip/studip!3767 --- lib/bootstrap.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bootstrap.php b/lib/bootstrap.php index 2d4e2e83da8..c92f60440e5 100644 --- a/lib/bootstrap.php +++ b/lib/bootstrap.php @@ -132,13 +132,13 @@ try { 'studip', app(StudipPDO::class) ); -} catch (PDOException $exception) { +} catch (\PDOException $exception) { if (Studip\ENV === 'development') { throw $exception; } else { + error_log($exception); header('HTTP/1.1 500 Internal Server Error'); - die(sprintf('database connection %s failed', 'mysql:host=' . $GLOBALS['DB_STUDIP_HOST'] . - ';dbname=' . $GLOBALS['DB_STUDIP_DATABASE'])); + die(_('Momentan ist das Stud.IP System nicht erreichbar, bitte versuchen Sie es später noch einmal.')); } } // set slave connection -- GitLab