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);