From 6454c1dee719d3fb45beb4edbe829d3ee8ce1a57 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 7 Jan 2023 19:52:43 +0100 Subject: [PATCH] Don't ksort() on null --- src/Core/Addon.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Core/Addon.php b/src/Core/Addon.php index ef2289ca59..976b9799be 100644 --- a/src/Core/Addon.php +++ b/src/Core/Addon.php @@ -85,6 +85,11 @@ class Addon { $addons_admin = []; $addons = DI::config()->get('addons'); + + if (empty($addons)) { + return $addons_admin; + } + ksort($addons); foreach ($addons as $name => $data) { if (empty($data['admin'])) { -- 2.39.5