From 3b2396ec4161af17c179c4822afd93a13c148ef0 Mon Sep 17 00:00:00 2001 From: billz Date: Mon, 22 Sep 2025 03:10:11 -0700 Subject: [PATCH] php 7.4 compatibility fix --- includes/dashboard.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/dashboard.php b/includes/dashboard.php index 664536ad..441cd052 100755 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -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 = ''; } else {