Skip to content

Commit

Permalink
Fix #5224. config:export --help includes warning about 'Undefined arr…
Browse files Browse the repository at this point in the history
…ay key description' (#5238)
  • Loading branch information
weitzman committed Sep 19, 2022
1 parent 643b355 commit 284174e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Commands/help/HelpCLIFormatter.php
Expand Up @@ -136,11 +136,18 @@ public static function formatArgumentName($argument)

protected function cleanOptions(&$data): void
{

if (array_key_exists('options', $data)) {
foreach ($data['options'] as $key => $option) {
// Remove global options.
if (self::isGlobalOption($key)) {
unset($data['options'][$key]);
}

// Populate missing props.
if ($key == 'desciption' && !isset($option[$key])) {
$option[$key] = '';
}
}
}
}
Expand Down

0 comments on commit 284174e

Please sign in to comment.