Fix for PHP 8.1 compatibility

This commit is contained in:
JRGTH
2022-06-30 16:35:04 -04:00
parent 995a1233ac
commit 01ba718169
4 changed files with 5 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
====================== ======================
Version Description Version Description
1.1.12......Fix for PHP 8.1 compatibility.
1.1.11......Fix to replace deprecated PHP date function. 1.1.11......Fix to replace deprecated PHP date function.
1.1.10......Add Debian 11(Bullseye) to the WebGUI. 1.1.10......Add Debian 11(Bullseye) to the WebGUI.
1.1.09......Always check/update create.sh for /tmp sane permissions. 1.1.09......Always check/update create.sh for /tmp sane permissions.

View File

@@ -92,11 +92,11 @@ function get_version_bastille() {
if (is_file("{$tarballversion}")) { if (is_file("{$tarballversion}")) {
//exec("/bin/cat {$tarballversion}", $result); //exec("/bin/cat {$tarballversion}", $result);
exec("/usr/bin/grep 'BASTILLE_VERSION=' {$tarballversion} | cut -d'\"' -f2", $result); exec("/usr/bin/grep 'BASTILLE_VERSION=' {$tarballversion} | cut -d'\"' -f2", $result);
return ($result[0]); return ($result[0] ?? '');
} }
else { else {
exec("/usr/local/bin/{$prdname} version | awk 'NR==1'", $result); exec("/usr/local/bin/{$prdname} version | awk 'NR==1'", $result);
return ($result[0]); return ($result[0] ?? '');
} }
} }

View File

@@ -274,7 +274,7 @@ if ($_POST) {
function get_version_ext() { function get_version_ext() {
global $versionfile; global $versionfile;
exec("/bin/cat {$versionfile}", $result); exec("/bin/cat {$versionfile}", $result);
return ($result[0]); return ($result[0] ?? '');
} }
if (is_ajax()) { if (is_ajax()) {

View File

@@ -1 +1 @@
1.1.11 1.1.12