Bugfix Undefined property: MailSo\Mail\FolderCollection::$capabilities

This commit is contained in:
the-djmaze 2022-12-05 13:32:00 +01:00
parent 116fed7284
commit aa22dc61ca

View file

@ -71,12 +71,6 @@ trait Folders
$aSystemFolders = array();
$this->recFoldersTypes($oAccount, $oFolderCollection, $aSystemFolders);
if (!$this->Config()->Get('imap', 'use_sort', true)) {
$oFolderCollection->capabilities = \array_filter($oFolderCollection->capabilities, function($item){
return !\preg_match('/^E?SORT/', $item);
});
}
if ($this->Config()->Get('labs', 'autocreate_system_folders', false))
{
$bDoItAgain = false;
@ -186,8 +180,10 @@ trait Folders
}
}
$aCapabilities = \array_filter($this->MailClient()->Capability(), function($item){
return !\preg_match('/^(IMAP|AUTH|LOGIN|SASL)/', $item);
$bUseSort = $this->Config()->Get('imap', 'use_sort', true);
$aCapabilities = \array_filter($this->MailClient()->Capability(), function ($item) use ($bUseSort) {
return !\preg_match('/^(IMAP|AUTH|LOGIN|SASL)/', $item)
&& ($bUseSort || !\preg_match('/^E?SORT/', $item));
});
if (!$this->Config()->Get('imap', 'use_list_status', true)) {
$key = \array_search('LIST-STATUS', $aCapabilities);