From 979672a3c1c6aacb91f005e5912763ad55d08dd1 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 8 Jan 2023 02:33:50 +0100 Subject: [PATCH] Filter disabled addons with "null" --- src/Core/Addon.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Core/Addon.php b/src/Core/Addon.php index 8d1a866915..06f6a12967 100644 --- a/src/Core/Addon.php +++ b/src/Core/Addon.php @@ -84,7 +84,7 @@ class Addon public static function getAdminList(): array { $addons_admin = []; - $addons = DI::config()->get('addons') ?? []; + $addons = array_filter(DI::config()->get('addons') ?? []); ksort($addons); foreach ($addons as $name => $data) { @@ -117,7 +117,7 @@ class Addon */ public static function loadAddons() { - self::$addons = array_keys(DI::config()->get('addons') ?? []); + self::$addons = array_keys(array_filter(DI::config()->get('addons') ?? [])); } /** @@ -192,7 +192,7 @@ class Addon */ public static function reload() { - $addons = DI::config()->get('addons') ?? []; + $addons = array_filter(DI::config()->get('addons') ?? []); foreach ($addons as $name => $data) { $addonname = Strings::sanitizeFilePathItem(trim($name)); @@ -315,7 +315,7 @@ class Addon public static function getVisibleList(): array { $visible_addons = []; - $addons = DI::config()->get('addons') ?? []; + $addons = array_filter(DI::config()->get('addons') ?? []); foreach ($addons as $name => $data) { $visible_addons[] = $name; -- 2.39.5