[BUGFIX] Wrong $host value when transport_smtp_server is not set. 45/56345/3
authorSascha Löffler <lsascha@gmail.com>
Sun, 18 Mar 2018 09:44:52 +0000 (10:44 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 18 Mar 2018 11:13:44 +0000 (12:13 +0100)
Set $host to empty string
if $mailSettings['transport_smtp_server'] does not exist.

Resolves: #84464
Releases: master
Change-Id: I3851bf262e51639e4572dfd8c1967e58b67ca792
Reviewed-on: https://review.typo3.org/56345
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Mail/TransportFactory.php

index 1bd203b..636f946 100644 (file)
@@ -58,7 +58,7 @@ class TransportFactory implements SingletonInterface
                     $host = $parts[0];
                     $port = $parts[1] ?? null;
                 } else {
-                    $host = (string)$mailSettings['transport_smtp_server'] ?? null;
+                    $host = (string)$mailSettings['transport_smtp_server'] ?? '';
                     $port = null;
                 }