diff --git a/api/src/Mail.php b/api/src/Mail.php index e665e5cf55..7a7780a2ba 100644 --- a/api/src/Mail.php +++ b/api/src/Mail.php @@ -3189,7 +3189,7 @@ class Mail //error_log(__METHOD__.__LINE__.array2string($autoFolderObjects)); // avoid calling sortByAutoFolder as it is not regarding subfolders $autoFolderObjectsTmp = $autoFolderObjects; - unset($autoFolderObjects); + $autoFolderObjects = []; uasort($autoFolderObjectsTmp, array($this,'sortByMailbox')); foreach($autoFoldersTmp as $afk=>$aF) {