diff --git a/Neos.ContentRepository/Classes/Command/NodeTypesCommandController.php b/Neos.ContentRepository/Classes/Command/NodeTypesCommandController.php index 65d05f57711..5892199e9b4 100644 --- a/Neos.ContentRepository/Classes/Command/NodeTypesCommandController.php +++ b/Neos.ContentRepository/Classes/Command/NodeTypesCommandController.php @@ -44,9 +44,14 @@ public function showCommand(string $nodeTypeName, string $path = '', int $level $this->quit(); } - $configuration = $path - ? self::truncateArrayAtLevel($nodeType->getConfiguration($path), $level) - : [$nodeTypeName => self::truncateArrayAtLevel($nodeType->getFullConfiguration(), $level)]; + if (empty($path)) { + $configuration = [$nodeTypeName => self::truncateArrayAtLevel($nodeType->getFullConfiguration(), $level)]; + } else { + $configuration = $nodeType->getConfiguration($path); + if (is_array($configuration)) { + $configuration = self::truncateArrayAtLevel($configuration, $level); + } + } $yaml = Yaml::dump($configuration, 99);