From 90d978c5cc9d1e323917b3f70c756ad0b07dbcd7 Mon Sep 17 00:00:00 2001 From: Stephan de Wit Date: Wed, 25 Jan 2023 13:28:18 +0100 Subject: [PATCH] SystemStatus: glob() produces a full pathname, use basename instead of str_replace --- src/opnsense/mvc/app/library/OPNsense/System/SystemStatus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/mvc/app/library/OPNsense/System/SystemStatus.php b/src/opnsense/mvc/app/library/OPNsense/System/SystemStatus.php index 96d5f7bfc..896a209fc 100644 --- a/src/opnsense/mvc/app/library/OPNsense/System/SystemStatus.php +++ b/src/opnsense/mvc/app/library/OPNsense/System/SystemStatus.php @@ -53,7 +53,7 @@ class SystemStatus $all = glob(__DIR__ . '/Status/*.php'); $classes = array_map(function ($file) { if (strpos($file, 'Status') !== false) { - return '\\OPNsense\\System\\Status\\' . str_replace('.php', '', $file); + return '\\OPNsense\\System\\Status\\' . basename($file, '.php'); } }, $all);