From 198ee84d9a435fc66c29d55e83b02a4e8bdbd988 Mon Sep 17 00:00:00 2001 From: fusionate Date: Wed, 10 May 2023 22:23:22 +0000 Subject: [PATCH] Dashboard: Updates for PHP 8.1 --- core/dashboard/index.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/dashboard/index.php b/core/dashboard/index.php index 937bde7881..d11081a123 100644 --- a/core/dashboard/index.php +++ b/core/dashboard/index.php @@ -31,9 +31,11 @@ //if config.conf file does not exist then redirect to the install page if (file_exists("/usr/local/etc/fusionpbx/config.conf")){ //BSD - } elseif (file_exists("/etc/fusionpbx/config.conf")){ + } + elseif (file_exists("/etc/fusionpbx/config.conf")){ //Linux - } else { + } + else { header("Location: /core/install/install.php"); exit; } @@ -85,7 +87,7 @@ $sql .= ")\n"; $sql .= "order by dashboard_order asc \n"; $database = new database; - $dashboard = $database->select($sql, $parameters, 'all'); + $dashboard = $database->select($sql, $parameters ?? null, 'all'); unset($sql, $parameters); //get http post variables and set them to php variables