8000 Empty shortcut check in the constructor · symfony/symfony@2c19b3c · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c19b3c

Browse files
committed
Empty shortcut check in the constructor
1 parent cf9039e commit 2c19b3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Console/Input/InputOption.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ public function __construct($name, $shortcut = null, $mode = null, $description
5858
if ('-' === $shortcut[0]) {
5959
$shortcut = substr($shortcut, 1);
6060
}
61+
62+
if (empty($shortcut)) {
63+
$shortcut = null;
64+
}
6165
}
6266

6367
if (null === $mode) {

0 commit comments

Comments
 (0)
0