We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents de9c064 + d675451 commit 6decfa3Copy full SHA for 6decfa3
src/src/Commands/DynamicCommand.php
@@ -27,7 +27,7 @@ protected function validate_required_options( InputInterface $input ): void {
27
foreach ( $options as $option ) {
28
$name = $option->getName();
29
$value = $input->getOption( $name );
30
- if ( $option->isValueRequired() && empty( $value ) ) {
+ if ( $option->isValueRequired() && ( is_null( $value ) || $value === '' ) ) {
31
throw new \InvalidArgumentException( sprintf( 'The required option "%s" is not set. Run the command with --help for more information.', $name ) );
32
}
33
0 commit comments