Skip to content

Commit

Permalink
Uncaught TypeError When Accessing Datahub Config #241
Browse files Browse the repository at this point in the history
  • Loading branch information
weisswurstkanone committed Jun 26, 2020
1 parent a71267c commit fedf2b1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Controller/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,14 @@ public function listAction(Request $request): JsonResponse
\Pimcore::getEventDispatcher()->dispatch(AdminEvents::CONFIGURATION_LIST, $event);
$list = $event->getArgument("list");

$tree = [];

// add configurations to their corresponding folder
foreach ($list as $configuration) {
$config = $this->buildItem($configuration);
$tree[] = $config;
if (is_array($list)) {
foreach ($list as $configuration) {
$config = $this->buildItem($configuration);
$tree[] = $config;
}
}

return $this->json($tree);
Expand Down

0 comments on commit fedf2b1

Please sign in to comment.