From 94a04fb4c45614714571258ded91008f2878eeb9 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 11 Jan 2013 10:54:59 +0000 Subject: [PATCH] try to handle possible errors when retrieving folderStatus --- felamimail/inc/class.felamimail_bo.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/felamimail/inc/class.felamimail_bo.inc.php b/felamimail/inc/class.felamimail_bo.inc.php index 4b515d5ef1..e859b0e282 100644 --- a/felamimail/inc/class.felamimail_bo.inc.php +++ b/felamimail/inc/class.felamimail_bo.inc.php @@ -1657,6 +1657,7 @@ class felamimail_bo { $retval = true; if($folderToSelect && ($folderStatus = $this->getFolderStatus($folderToSelect,false,true))) { + if ($folderStatus instanceof PEAR_Error) return false; if (stripos(array2string($folderStatus['attributes']),'noselect')!==false) { $retval = false; @@ -1731,7 +1732,7 @@ class felamimail_bo { $retValue['displayName'] = $retValue['shortDisplayName'] = lang($retValue['shortName']); } - $folderBasicInfo[$this->profileID][$_folderName]=$retValue; + if (!($folderInfo instanceof PEAR_Error)) $folderBasicInfo[$this->profileID][$_folderName]=$retValue; egw_cache::setCache(egw_cache::INSTANCE,'email','folderBasicInfo'.trim($GLOBALS['egw_info']['user']['account_id']),$folderBasicInfo,$expiration=60*60*1); if ($basicInfoOnly || stripos(array2string($retValue['attributes']),'noselect')!==false) {