check that cachedComposeId is set before trying to compare

This commit is contained in:
Klaus Leithoff 2012-11-08 16:02:32 +00:00
parent f419a29227
commit 469ca1ff84

View File

@ -183,8 +183,8 @@
} else {
$cachedComposeID = egw_cache::getCache(egw_cache::INSTANCE,'email','composeIdCache'.trim($GLOBALS['egw_info']['user']['account_id']),$callback=null,$callback_params=array(),$expiration=5);
egw_cache::setCache(egw_cache::INSTANCE,'email','composeIdCache'.trim($GLOBALS['egw_info']['user']['account_id']),$this->composeID,$expiration=5);
//error_log(__METHOD__.__LINE__.' '.$formData['subject'].' '.$cachedComposeID.'<->'.$this->composeID);
if ($cachedComposeID != $this->composeID) return;
error_log(__METHOD__.__LINE__.' '.$formData['subject'].' '.$cachedComposeID.'<->'.$this->composeID);
if (!empty($cachedComposeID) && $cachedComposeID != $this->composeID) return;
if(!$this->bocompose->send($formData)) {
// print "<script type=\"text/javascript\">alert('".lang("Error: Could not send Message.")." ".lang("Trying to recover from session data")."');</script>";
$this->compose();