diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-12-18 09:08:32 +0000 |
|---|---|---|
| committer | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2024-12-18 10:24:06 +0100 |
| commit | 1ea772316eefca8ce3906c2e04e4d968632fdaf8 (patch) | |
| tree | acf1b8f592b49b6cbd73eee13bf021928485d811 /lib/bootstrap.php | |
| parent | 8c8354c50eb352da0d7a28fae16982ac2a12bf32 (diff) | |
set attribute PDO::ATTR_STRINGIFY_FETCHES in production mode, fixes #4971
Closes #4971
Merge request studip/studip!3732
Diffstat (limited to 'lib/bootstrap.php')
| -rw-r--r-- | lib/bootstrap.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bootstrap.php b/lib/bootstrap.php index 54b7521..91acb1a 100644 --- a/lib/bootstrap.php +++ b/lib/bootstrap.php @@ -150,6 +150,11 @@ if (isset($GLOBALS['DB_STUDIP_SLAVE_HOST'])) { DBManager::getInstance()->aliasConnection('studip', 'studip-slave'); } +if (Studip\ENV === 'production') { + DBManager::get()->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); + DBManager::get('studip-slave')->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); +} + // set default exception handler // command line or http request? if (isset($_SERVER['REQUEST_METHOD'])) { |
