Backport commit r48032 committed by Ralf Becker. Fix for invalid operand, if vacation cache is not yet initialised

This commit is contained in:
Hadi Nategh 2014-08-11 14:27:29 +00:00
parent 76f2141502
commit ed5d06544b

View File

@ -2300,10 +2300,12 @@ class mail_ui
$sieveServer->retrieveRules();
$vacation = $sieveServer->getVacation();
$cachedVacations = array($sieveServer->acc_id => $vacation) + $cachedVacations;
$cachedVacations = array($sieveServer->acc_id => $vacation) + (array)$cachedVacations;
// Set vacation to the instance cache for particular account with expiration of one day
egw_cache::setCache(egw_cache::INSTANCE, 'email', 'vacationNotice'+$GLOBALS['egw_info']['user']['account_lid'], $cachedVacations, 60*60*24);
} catch (PEAR_Exception $ex) {
}
catch (PEAR_Exception $ex)
{
$this->callWizard($ex->getMessage(), true, 'error');
}
}