From ade26b7267cf908debb7f4c4e16043597bd6a7fa Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Wed, 13 Nov 2024 12:56:24 +0200 Subject: [PATCH] Participants page DB connect fix --- app/pages/participants.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/pages/participants.php b/app/pages/participants.php index 3705741..ae4c58a 100644 --- a/app/pages/participants.php +++ b/app/pages/participants.php @@ -3,7 +3,13 @@ require '../app/classes/participant.php'; // connect to database -$db = connectDB($config, 'jilo', $platformDetails[0]['jilo_database'], $platform_id); +$response = connectDB($config, 'jilo', $platformDetails[0]['jilo_database'], $platform_id); +if ($response['db'] === null) { + $error = $response['error']; + include '../app/templates/block-message.php'; +} else { + $db = $response['db']; +} // specify time range include '../app/helpers/time_range.php';