Ver Fonte

Merge pull request #3319 from desyncr/bugfix/missing-default-author-value-validation

Fix missing validation on default value for author input
Jordi Boggiano há 10 anos atrás
pai
commit
4bdd7adc55
1 ficheiros alterados com 1 adições e 4 exclusões
  1. 1 4
      src/Composer/Command/InitCommand.php

+ 1 - 4
src/Composer/Command/InitCommand.php

@@ -228,10 +228,7 @@ EOT
             $output,
             $dialog->getQuestion('Author', $author),
             function ($value) use ($self, $author) {
-                if (null === $value) {
-                    return $author;
-                }
-
+                $value = $value ?: $author;
                 $author = $self->parseAuthorString($value);
 
                 return sprintf('%s <%s>', $author['name'], $author['email']);