From 46c92e7404045ca6e9fa5d2112de1a14a91d1f65 Mon Sep 17 00:00:00 2001 From: Alexis Toulotte Date: Tue, 3 Sep 2024 09:16:17 +1100 Subject: [PATCH 1/2] fix(configuration): Use "model_options[opt]" section from "conf.php" --- lib/Configuration.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Configuration.php b/lib/Configuration.php index df446233..6013f916 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -166,7 +166,7 @@ class Configuration 'tbl' => null, 'usr' => null, 'pwd' => null, - 'opt' => array(PDO::ATTR_PERSISTENT => true), + 'opt' => array(), ); } elseif ( $section == 'model_options' && in_array( @@ -235,6 +235,8 @@ class Configuration $result = (int) $config[$section][$key]; } elseif (is_string($val) && !empty($config[$section][$key])) { $result = (string) $config[$section][$key]; + } elseif (is_array($val) && is_array($config[$section][$key])) { + $result = $config[$section][$key]; } } $this->_configuration[$section][$key] = $result; From d0d0d7b6e5b9f79daed713e62a7965d86771bbef Mon Sep 17 00:00:00 2001 From: Alexis Toulotte Date: Tue, 3 Sep 2024 09:40:08 +1100 Subject: [PATCH 2/2] fix: Get rid of unused code --- lib/Configuration.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Configuration.php b/lib/Configuration.php index 6013f916..9b2717ca 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -12,7 +12,6 @@ namespace PrivateBin; use Exception; -use PDO; /** * Configuration