Skip to content

Commit

Permalink
[Mime] use fromString when creating a new Adress
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jun 9, 2020
1 parent 9b132bc commit de68787
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Mime/Address.php
Expand Up @@ -89,7 +89,7 @@ public static function create($address): self
return $address;
}
if (\is_string($address)) {
return new self($address);
return self::fromString($address);
}

throw new InvalidArgumentException(sprintf('An address can be an instance of Address or a string ("%s") given).', \is_object($address) ? \get_class($address) : \gettype($address)));
Expand Down

0 comments on commit de68787

Please sign in to comment.