diff --git a/src/QUI/Bricks/Manager.php b/src/QUI/Bricks/Manager.php index 63b54ad20eff8a4c02c67bc552f4e28eb67aa25e..ee73b57b111f0727ad254460f2e420343708cb5e 100644 --- a/src/QUI/Bricks/Manager.php +++ b/src/QUI/Bricks/Manager.php @@ -251,9 +251,20 @@ public function getAvailableBricks() $result = array_merge($result, Utils::getBricksFromXML($bricksXML)); } - QUI\Cache\Manager::set($cache, $result); + $result = array_filter($result, function ($brick) { + return !empty($brick['title']); + }); - return $result; + // js workaround + $list = array(); + + foreach ($result as $entry) { + $list[] = $entry; + } + + QUI\Cache\Manager::set($cache, $list); + + return $list; } /** diff --git a/src/QUI/Bricks/Utils.php b/src/QUI/Bricks/Utils.php index f14c3031e87711c39e9e8074e5aaa8a627ea5d93..121659a9892cfe238e62e7788b0153a1d8812773 100644 --- a/src/QUI/Bricks/Utils.php +++ b/src/QUI/Bricks/Utils.php @@ -42,6 +42,7 @@ public static function getBricksFromXML($file) return $list; } + /* @var $Brick \DOMElement */ foreach ($bricks as $Brick) { if ($Brick->getAttribute('control') == '*') { continue;