Skip to content
Snippets Groups Projects
Commit 0a8d1641 authored by Oliver Klee's avatar Oliver Klee Committed by Christian Kuhn
Browse files

[TASK] Drop redundant condition from TransportFactory

The variable `$port` in the changed code is an array element
from the return value of `GeneralUtility::trimExplode()` with
the `$removeEmptyValues` argument set to `true`. Hence it
is ensured to not be an empty string.

This change should be backported as it otherwise would block
improvements for the type annotations of
`GeneralUtility::trimExplode()`.

Resolves: #101384
Releases: main, 12.4, 11.5
Change-Id: I74ce433495fc3975c11991d21831db0244eacba0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80085


Tested-by: default avatarAlexander Schnitzler <git@alexanderschnitzler.de>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarStefan B�rk <stefan@buerk.tech>
Reviewed-by: default avatarStefan B�rk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarAlexander Schnitzler <git@alexanderschnitzler.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent fa9c3d0d
Branches
Tags
No related merge requests found
......@@ -87,7 +87,7 @@ class TransportFactory implements SingletonInterface, LoggerAwareInterface
if ($host === '') {
throw new Exception('$GLOBALS[\'TYPO3_CONF_VARS\'][\'MAIL\'][\'transport_smtp_server\'] needs to be set when transport is set to "smtp".', 1291068606);
}
if ($port === null || $port === '') {
if ($port === null) {
$port = 25;
} else {
$port = (int)$port;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment