Merge branch '5.1'

* 5.1:
  [Mime] use fromString when creating a new Adress
This commit is contained in:
Fabien Potencier 2020-06-09 17:07:48 +02:00
commit 61d79e19a9
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ final class Address
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).', get_debug_type($address)));