Skip to content

Commit

Permalink
Catch error.
Browse files Browse the repository at this point in the history
Prevents fatal errors in EAS searching due to folders not being found
or being able to be opened. Fixes issues with broken clients requesting
search results from the Outbox.
  • Loading branch information
mrubinsk committed Feb 26, 2016
1 parent 5ab6f8e commit 722108b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions framework/Core/lib/Horde/Core/ActiveSync/Driver.php
Expand Up @@ -2039,9 +2039,14 @@ public function getSearchResults($type, array $query)
if (!empty($this->_cache) && $this->_cache->exists($cache_key, 0)) {
$results = json_decode($this->_cache->get($cache_key, 0), true);
} else {
$results = $this->_searchMailbox($query);
if (!empty($this->_cache)) {
$this->_cache->set($cache_key, json_encode($results));
try {
$results = $this->_searchMailbox($query);
if (!empty($this->_cache)) {
$this->_cache->set($cache_key, json_encode($results));
}
} catch (Horde_ActiveSync_Exception $e) {
$this->_logger->err($e->getMessage());
$results = array();
}
}

Expand Down

0 comments on commit 722108b

Please sign in to comment.