mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 07:27:04 +03:00
[snappymail] No need to call trim() twice
Mostly a cosmetic change, but stil.
This commit is contained in:
parent
8934205ede
commit
542a1c9624
1 changed files with 3 additions and 3 deletions
|
|
@ -2083,13 +2083,13 @@ class MailClient
|
||||||
*/
|
*/
|
||||||
public function FolderCreate(string $sFolderNameInUtf8, string $sFolderParentFullNameRaw = '', bool $bSubscribeOnCreation = true, string $sDelimiter = '') : self
|
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;
|
throw new \MailSo\Base\Exceptions\InvalidArgumentException;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sFolderNameInUtf8 = \trim($sFolderNameInUtf8);
|
|
||||||
|
|
||||||
if (0 === \strlen($sDelimiter) || 0 < \strlen(\trim($sFolderParentFullNameRaw)))
|
if (0 === \strlen($sDelimiter) || 0 < \strlen(\trim($sFolderParentFullNameRaw)))
|
||||||
{
|
{
|
||||||
$aFolders = $this->oImapClient->FolderList('', 0 === \strlen(\trim($sFolderParentFullNameRaw)) ? 'INBOX' : $sFolderParentFullNameRaw);
|
$aFolders = $this->oImapClient->FolderList('', 0 === \strlen(\trim($sFolderParentFullNameRaw)) ? 'INBOX' : $sFolderParentFullNameRaw);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue