aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-12-18 09:08:32 +0000
committerElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2024-12-18 09:08:32 +0000
commit6c14b24a0ff71f26bea19c827860220371e5eccf (patch)
treee2484d0bb5dd03231cd5c9aaa078dfabebff3525
parentf86f372484717d029dadbdcd04fbeaf590ee9f87 (diff)
set attribute PDO::ATTR_STRINGIFY_FETCHES in production mode, fixes #4971
Closes #4971 Merge request studip/studip!3732
-rw-r--r--lib/bootstrap.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bootstrap.php b/lib/bootstrap.php
index c92f604..0ba2599 100644
--- a/lib/bootstrap.php
+++ b/lib/bootstrap.php
@@ -159,6 +159,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'])) {