diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index 11a19de26..30ef1fd0c 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -691,11 +691,16 @@ EOT /** * @param string $author * - * @return array + * @return array */ protected function formatAuthors($author) { - return array(array_filter($this->parseAuthorString($author), 'is_string')); + $author = $this->parseAuthorString($author); + if (null === $author['email']) { + unset($author['email']); + } + + return array($author); } /**