From 6722e59de4f003f7e956b1fe978ab1fdc1d4f73f Mon Sep 17 00:00:00 2001 From: Pek5892 Date: Tue, 6 Feb 2024 16:27:00 +0100 Subject: [PATCH] Fix creazione config --- index.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index c6eb83291..0ec516a05 100755 --- a/index.php +++ b/index.php @@ -21,14 +21,17 @@ $skip_permissions = true; include_once __DIR__.'/core.php'; use Carbon\Carbon; +use Illuminate\Database\QueryException; $op = filter('op'); $microsoft = null; -try { - $microsoft = $dbo->selectOne('zz_oauth2', '*', ['nome' => 'Microsoft', 'enabled' => 1, 'is_login' => 1]); -} catch (Exception $e) { +if ($dbo->isConnected()) { + try { + $microsoft = $dbo->selectOne('zz_oauth2', '*', ['nome' => 'Microsoft', 'enabled' => 1, 'is_login' => 1]); + } catch ( QueryException $e) { + } } // LOGIN