PHP 8 时 执行 php think 错误

Signed-off-by: DingYi <44069836@qq.com>
This commit is contained in:
DingYi
2024-08-17 06:54:00 +00:00
committed by Gitee
parent c859e712f5
commit 8c377decb5

View File

@@ -155,7 +155,7 @@ class Descriptor
$this->writeText('<comment>Options:</comment>', $options);
foreach ($definition->getOptions() as $option) {
if (strlen($option->getShortcut()) > 1) {
if ($option->getShortcut() && strlen($option->getShortcut()) > 1) {
$laterOptions[] = $option;
continue;
}