diff --git a/StubsController.php b/StubsController.php index b1e8aa5..3bd4a1c 100644 --- a/StubsController.php +++ b/StubsController.php @@ -74,15 +74,19 @@ public function actionIndex() $config = include($configPath); - foreach ($config['components'] as $name => $component) { - if (!isset($component['class'])) { - continue; - } + if (empty($config['components'])) { + continue; + } + foreach ($config['components'] as $name => $component) { if ($name === 'user' && isset($component['identityClass'])) { $userIdentities[] = $component['identityClass']; } + if (!isset($component['class'])) { + continue; + } + $components[$name][] = $component['class']; } }