Skip to content

Commit

Permalink
Need to catch Exception during unserialze.
Browse files Browse the repository at this point in the history
The object being unserialized may throw an Exception if there
is a versioning change in it's own serialized data structure. Like e.g.,
Horde_Mime_Headers.
  • Loading branch information
mrubinsk committed Nov 24, 2014
1 parent 8e9dc89 commit 7e294a7
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ public function get($mailbox, $uids, $fields, $uidvalid)
$res = $this->_db->select($query[0], $query[1]);

foreach ($res as $row) {
$out[$row['msguid']] = @unserialize($compress->decompress(
$columns['data']->binaryToString($row['data'])
));
try {
$out[$row['msguid']] = @unserialize($compress->decompress(
$columns['data']->binaryToString($row['data'])
));
} catch (Exception $e) {}
}
} catch (Horde_Db_Exception $e) {}

Expand Down

0 comments on commit 7e294a7

Please sign in to comment.