Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 08fe044

Browse files
committed
if someone sets an empty string alias before, let that fall through to raise an extension later
1 parent d31b5bf commit 08fe044

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Symfony/Component/Console/Command/Command.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ public function __construct(?string $name = null, ?callable $code = null)
121121
}
122122

123123
// we must not overwrite existing aliases, combine new ones with existing ones
124-
$aliases = array_unique(array_filter([
124+
$aliases = array_unique([
125125
...$this->aliases,
126-
...$aliases,
127-
]));
126+
...array_filter($aliases),
127+
]);
128128

129129
if ([] !== $aliases) {
130130
$this->setAliases($aliases);

0 commit comments

Comments
 (0)