diff --git a/lib/bootstrap.php b/lib/bootstrap.php
index c92f60440e5b5fd4744c9b7c2892804ce2874df3..0ba2599772d8f7e92e104b70b8a5e9ed6fe0d6ae 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'])) {