From 2c19b3c7e52e6268e6dea6eb48c5c5a04fc0b6fe Mon Sep 17 00:00:00 2001 From: Arnaud Kleinpeter Date: Sun, 20 May 2012 14:59:46 +0200 Subject: [PATCH] Empty shortcut check in the constructor --- src/Symfony/Component/Console/Input/InputOption.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Console/Input/InputOption.php b/src/Symfony/Component/Console/Input/InputOption.php index 0f2604556c..dbfcb216ad 100644 --- a/src/Symfony/Component/Console/Input/InputOption.php +++ b/src/Symfony/Component/Console/Input/InputOption.php @@ -58,6 +58,10 @@ class InputOption if ('-' === $shortcut[0]) { $shortcut = substr($shortcut, 1); } + + if (empty($shortcut)) { + $shortcut = null; + } } if (null === $mode) {