Merge branch '4.4' into 5.0
* 4.4: [Mime] use fromString when creating a new Adress
This commit is contained in:
commit
748854bad1
|
@ -89,7 +89,7 @@ final class Address
|
||||||
return $address;
|
return $address;
|
||||||
}
|
}
|
||||||
if (\is_string($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)));
|
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)));
|
||||||
|
|
Reference in New Issue