Skip to content

Commit dd22deb

Browse files
committed
BUGFIX: Prevent truncateArrayAtDepth(): Argument #1 ($array) must be of type array, null given
In `configuration:show`
1 parent f0221f2 commit dd22deb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Neos.Flow/Classes/Command/ConfigurationCommandController.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ public function showCommand(string $type = 'Settings', string $path = '', int $d
7373
if ($path !== '') {
7474
$configuration = Arrays::getValueByPath($configuration, $path);
7575
}
76-
$configuration = self::truncateArrayAtDepth($configuration, $depth);
7776
$typeAndPath = $type . ($path ? ': ' . $path : '');
7877
if ($configuration === null) {
7978
$this->outputLine('<b>Configuration "%s" was empty!</b>', [$typeAndPath]);
80-
} else {
81-
$yaml = Yaml::dump($configuration, 99);
82-
$this->outputLine('<b>Configuration "%s":</b>', [$typeAndPath]);
83-
$this->outputLine();
84-
$this->outputLine($yaml . chr(10));
79+
return;
8580
}
81+
$configuration = self::truncateArrayAtDepth($configuration, $depth);
82+
$yaml = Yaml::dump($configuration, 99);
83+
$this->outputLine('<b>Configuration "%s":</b>', [$typeAndPath]);
84+
$this->outputLine();
85+
$this->outputLine($yaml . chr(10));
8686
} else {
8787
$this->outputLine('<b>Configuration type "%s" was not found!</b>', [$type]);
8888
$this->outputLine('<b>Available configuration types:</b>');

0 commit comments

Comments
 (0)