[Console] Make sure we pass a numeric array of arguments to call_user_func_array().

This commit is contained in:
Alexander M. Turek 2020-08-08 17:34:42 +02:00
parent 995d784a0d
commit 67102c32e6

View File

@ -204,7 +204,7 @@ class TextDescriptor extends Descriptor
// calculate max. width based on available commands per namespace
$width = $this->getColumnWidth(\call_user_func_array('array_merge', array_map(function ($namespace) use ($commands) {
return array_intersect($namespace['commands'], array_keys($commands));
}, $namespaces)));
}, array_values($namespaces))));
if ($describedNamespace) {
$this->writeText(sprintf('<comment>Available commands for the "%s" namespace:</comment>', $describedNamespace), $options);