diff --git a/mail/inc/class.mail_bo.inc.php b/mail/inc/class.mail_bo.inc.php index ed6e1172ab..a02b237bac 100644 --- a/mail/inc/class.mail_bo.inc.php +++ b/mail/inc/class.mail_bo.inc.php @@ -1538,7 +1538,7 @@ class mail_bo //_debug_array($_criterias); if (self::$debug) error_log(__METHOD__.__LINE__.' Criterias:'.(!is_array($_criterias)?" none -> returning $all":array2string($_criterias))); - if((!is_array($_criterias) || $_criterias['status']=='any') && !isset($_criterias['string']) && empty($_criterias['string'])) { + if((!is_array($_criterias) || $_criterias['status']=='any') && (!isset($_criterias['string']) || empty($_criterias['string']))) { $imapFilter->flag('DELETED', $set=false); return $imapFilter; } diff --git a/mail/js/app.js b/mail/js/app.js index f4bbefcbde..43108dbcd0 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -643,7 +643,9 @@ app.classes.mail = AppJS.extend( // Pre-load next email already so user gets it faster // Browser will cache the file for us - var next = egw_getObjectManager('mail',false,1).getObjectById('nm').getFocusedObject().getNext(1); + var fO = egw_getObjectManager('mail',false,1).getObjectById('nm').getFocusedObject(); + var next = false; + if (fO) next = fO.getNext(1); // Stop until we get all the details worked out - server marks as seen automatically if(false && next && next.id) {