mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
SystemStatus: glob() produces a full pathname, use basename instead of str_replace
This commit is contained in:
parent
b6a097c7b4
commit
90d978c5cc
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user