Browse Source

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

Fix missing validation on default value for author input
Jordi Boggiano 10 years ago
parent
commit
4bdd7adc55
1 changed files with 1 additions and 4 deletions
  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']);