From 01ba7181695a5f2ff64dd1af2e79750d24d27468 Mon Sep 17 00:00:00 2001 From: JRGTH Date: Thu, 30 Jun 2022 16:35:04 -0400 Subject: [PATCH] Fix for PHP 8.1 compatibility --- CHANGELOG | 1 + gui/bastille_manager-lib.inc | 4 ++-- gui/bastille_manager_maintenance.php | 2 +- version | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 9128788..76c17a8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ ====================== Version Description +1.1.12......Fix for PHP 8.1 compatibility. 1.1.11......Fix to replace deprecated PHP date function. 1.1.10......Add Debian 11(Bullseye) to the WebGUI. 1.1.09......Always check/update create.sh for /tmp sane permissions. diff --git a/gui/bastille_manager-lib.inc b/gui/bastille_manager-lib.inc index af9f9a4..d6cf529 100755 --- a/gui/bastille_manager-lib.inc +++ b/gui/bastille_manager-lib.inc @@ -92,11 +92,11 @@ function get_version_bastille() { if (is_file("{$tarballversion}")) { //exec("/bin/cat {$tarballversion}", $result); exec("/usr/bin/grep 'BASTILLE_VERSION=' {$tarballversion} | cut -d'\"' -f2", $result); - return ($result[0]); + return ($result[0] ?? ''); } else { exec("/usr/local/bin/{$prdname} version | awk 'NR==1'", $result); - return ($result[0]); + return ($result[0] ?? ''); } } diff --git a/gui/bastille_manager_maintenance.php b/gui/bastille_manager_maintenance.php index 659a48c..b32cf70 100644 --- a/gui/bastille_manager_maintenance.php +++ b/gui/bastille_manager_maintenance.php @@ -274,7 +274,7 @@ if ($_POST) { function get_version_ext() { global $versionfile; exec("/bin/cat {$versionfile}", $result); - return ($result[0]); + return ($result[0] ?? ''); } if (is_ajax()) { diff --git a/version b/version index 9ee1f78..ccad953 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.1.11 +1.1.12