From 4384cf36d59618c59fc2d3933a02c44149321e63 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 7 May 2024 23:54:48 +0300 Subject: [PATCH] skip empty pin list value --- src/Controller/ModuleController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Controller/ModuleController.php b/src/Controller/ModuleController.php index 98692a8..45a6142 100644 --- a/src/Controller/ModuleController.php +++ b/src/Controller/ModuleController.php @@ -102,9 +102,12 @@ class ModuleController extends AbstractController // Create rooms list $list = []; - foreach ((array) explode('|', $this->getParameter('app.kevacoin.room.namespaces.pinned')) as $room) + if ($this->getParameter('app.kevacoin.room.namespaces.pinned')) { - $list[] = $room; + foreach ((array) explode('|', $this->getParameter('app.kevacoin.room.namespaces.pinned')) as $room) + { + $list[] = $room; + } } // Append custom valid namespace to the rooms list menu