Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2887724

Browse files
committed
[Mailer] fixed logic
1 parent c8eed54 commit 2887724

File tree

1 file changed

+2
-2
lines changed
  • src/Symfony/Component/Mailer/Transport

1 file changed

+2
-2
lines changed

src/Symfony/Component/Mailer/Transport/Dsn.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public static function fromString(string $dsn): self
4949
throw new InvalidArgumentException(sprintf('The "%s" mailer DSN must contain a mailer name.', $dsn));
5050
}
5151

52-
$user = urldecode($parsedDsn['user'] ?? null);
53-
$password = urldecode($parsedDsn['pass'] ?? null);
52+
$user = isset($parsedDsn['user']) ? urldecode($parsedDsn['user']) : null;
53+
$password = isset($parsedDsn['pass']) ? urldecode($parsedDsn['pass']) : null;
5454
$port = $parsedDsn['port'] ?? null;
5555
parse_str($parsedDsn['query'] ?? '', $query);
5656

0 commit comments

Comments
 (0)