From d32e27059898615b8ade0223287a7ddc1a8fd8d5 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Fri, 8 Nov 2024 12:39:38 +0200 Subject: [PATCH] Troubleshooting error display --- app/helpers/database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/database.php b/app/helpers/database.php index a97e86c..ebb7ef9 100644 --- a/app/helpers/database.php +++ b/app/helpers/database.php @@ -29,7 +29,7 @@ function connectDB($config, $database = '', $dbFile = '', $platformId = '') { 'dbFile' => $config['db']['sqlite_file'], ]); $pdo = $db->getConnection(); - return $db; + return ['db' => $db, 'error' => null]; } catch (Exception $e) { $error = getError('Error connecting to DB.', $e->getMessage()); return $error; @@ -48,7 +48,7 @@ function connectDB($config, $database = '', $dbFile = '', $platformId = '') { 'password' => $config['db']['sql_password'], ]); $pdo = $db->getConnection(); - return $db; + return ['db' => $db, 'error' => null]; } catch (Exception $e) { $error = getError('Error connecting to DB.', $e->getMessage()); return $error;