From 20fe5fc5a7f54625e4579504e4c54b3f7af9cc0c Mon Sep 17 00:00:00 2001 From: billz Date: Mon, 24 Mar 2025 23:58:30 -0700 Subject: [PATCH] Fix: php7.4 compatibility --- src/RaspAP/UI/Dashboard.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/RaspAP/UI/Dashboard.php b/src/RaspAP/UI/Dashboard.php index aac7212d..7461afa6 100644 --- a/src/RaspAP/UI/Dashboard.php +++ b/src/RaspAP/UI/Dashboard.php @@ -26,12 +26,16 @@ class Dashboard { */ public function getVpnManged(?string $interface = null): ?string { - return match ($interface) { - 'wg0' => '/wg_conf', - 'tun0' => '/openvpn_conf', - 'tailscale0' => '/plugin__Tailscale', - default => null, - }; + switch ($interface) { + case 'wg0': + return '/wg_conf'; + case 'tun0': + return '/openvpn_conf'; + case 'tailscale0': + return '/plugin__Tailscale'; + default: + return null; + } } /*