From 452d4bc544c56518fdd5be1aef1cce097997f214 Mon Sep 17 00:00:00 2001 From: Stephan Huber Date: Tue, 23 Aug 2022 10:35:03 +0200 Subject: [PATCH] fix: shell-completion runs without warnings on PHP 8.1 --- src/ShellCompletion/FishShellCompletionDescriptor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ShellCompletion/FishShellCompletionDescriptor.php b/src/ShellCompletion/FishShellCompletionDescriptor.php index 35a82d4e..800f3a47 100644 --- a/src/ShellCompletion/FishShellCompletionDescriptor.php +++ b/src/ShellCompletion/FishShellCompletionDescriptor.php @@ -71,7 +71,7 @@ protected function describeInputOption(InputOption $option, array $options = arr "' -f" ); - if (strlen($option->getShortcut()) > 0) { + if ($option->getShortcut() && strlen($option->getShortcut()) > 0) { if (strlen($option->getShortcut()) == 1) { $this->output->write(" -s "); } else {