php 7.4 compatibility fix

This commit is contained in:
billz
2025-09-22 03:10:11 -07:00
parent f7ac3d0b9d
commit 3b2396ec41

View File

@@ -82,7 +82,9 @@ function DisplayDashboard(&$extraFooterScripts): void
$vpnStatus = $vpn ? "active" : "inactive";
$vpnManaged = $vpn ? $dashboard->getVpnManaged($vpn) : null;
$firewallManaged = $firewallStatus = "";
$firewallInstalled = array_filter($plugins, fn($p) => str_ends_with($p, 'Firewall')) ? true : false;
$firewallInstalled = (bool) array_filter($plugins, function($p) {
return substr($p, -strlen('Firewall')) === 'Firewall';
});
if (!$firewallInstalled) {
$firewallUnavailable = '<i class="fas fa-slash fa-stack-1x"></i>';
} else {