Fix TypeError (#10904)
Fix string type requirement in case of NULL value: [TypeError] Composer\Command\InitCommand::parseAuthorString(): Argument #1 ($author) must be of type string, null given, called in phar:///composer.phar/src/Composer/Command/InitCommand.php on line 345pull/10933/head
parent
f7e88099af
commit
7ab4306c78
|
@ -342,7 +342,7 @@ EOT
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$value = $value ?: $author;
|
$value = $value ?: $author;
|
||||||
$author = $this->parseAuthorString($value);
|
$author = $this->parseAuthorString($value ?? '');
|
||||||
|
|
||||||
if ($author['email'] === null) {
|
if ($author['email'] === null) {
|
||||||
return $author['name'];
|
return $author['name'];
|
||||||
|
|
Loading…
Reference in New Issue