From 542a1c9624aeb55bbfaa2a5040177fcdfb7c9c3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A4rdeman?= Date: Tue, 24 Aug 2021 23:08:46 +0200 Subject: [PATCH] [snappymail] No need to call trim() twice Mostly a cosmetic change, but stil. --- snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php index d1c5df73a..7934cfdb5 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php @@ -2083,13 +2083,13 @@ class MailClient */ public function FolderCreate(string $sFolderNameInUtf8, string $sFolderParentFullNameRaw = '', bool $bSubscribeOnCreation = true, string $sDelimiter = '') : self { - if (!strlen(\trim($sFolderNameInUtf8))) + $sFolderNameInUtf8 = \trim($sFolderNameInUtf8); + + if (0 === \strlen($sFolderNameInUtf8)) { throw new \MailSo\Base\Exceptions\InvalidArgumentException; } - $sFolderNameInUtf8 = \trim($sFolderNameInUtf8); - if (0 === \strlen($sDelimiter) || 0 < \strlen(\trim($sFolderParentFullNameRaw))) { $aFolders = $this->oImapClient->FolderList('', 0 === \strlen(\trim($sFolderParentFullNameRaw)) ? 'INBOX' : $sFolderParentFullNameRaw);