Skip to content
Snippets Groups Projects
Commit 6c14b24a authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Elmar Ludwig
Browse files

set attribute PDO::ATTR_STRINGIFY_FETCHES in production mode, fixes #4971

Closes #4971

Merge request studip/studip!3732
parent f86f3724
No related branches found
No related tags found
No related merge requests found
Pipeline #30273 passed
...@@ -159,6 +159,11 @@ if (isset($GLOBALS['DB_STUDIP_SLAVE_HOST'])) { ...@@ -159,6 +159,11 @@ if (isset($GLOBALS['DB_STUDIP_SLAVE_HOST'])) {
DBManager::getInstance()->aliasConnection('studip', 'studip-slave'); 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 // set default exception handler
// command line or http request? // command line or http request?
if (isset($_SERVER['REQUEST_METHOD'])) { if (isset($_SERVER['REQUEST_METHOD'])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment