From 6d94f99786bc83e75f5adcfb86b154207647e5fd Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 31 Jan 2024 14:44:54 +0100 Subject: [PATCH] Handle false for shortcut --- src/Symfony/Component/Console/Input/InputOption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Input/InputOption.php b/src/Symfony/Component/Console/Input/InputOption.php index 1d8dbca310212..99807f59e6bac 100644 --- a/src/Symfony/Component/Console/Input/InputOption.php +++ b/src/Symfony/Component/Console/Input/InputOption.php @@ -69,7 +69,7 @@ public function __construct(string $name, $shortcut = null, ?int $mode = null, s throw new InvalidArgumentException('An option name cannot be empty.'); } - if ('' === $shortcut || [] === $shortcut) { + if ('' === $shortcut || [] === $shortcut || false === $shortcut) { $shortcut = null; }