From 05644d39f81be2ecdfa4d61a046cd77775461dec Mon Sep 17 00:00:00 2001 From: Alexis Toulotte Date: Fri, 30 Aug 2024 11:10:25 +1100 Subject: [PATCH] fix(configuration): Allow non persistent SQL connections --- lib/Data/Database.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Data/Database.php b/lib/Data/Database.php index 2fb209b0..3837e6ff 100644 --- a/lib/Data/Database.php +++ b/lib/Data/Database.php @@ -72,7 +72,9 @@ class Database extends AbstractData // set default options $options['opt'][PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION; $options['opt'][PDO::ATTR_EMULATE_PREPARES] = false; - $options['opt'][PDO::ATTR_PERSISTENT] = true; + if (!array_key_exists(PDO::ATTR_PERSISTENT, $options['opt'])) { + $options['opt'][PDO::ATTR_PERSISTENT] = true; + } $db_tables_exist = true; // setup type and dabase connection