Skip to content

Commit

Permalink
Catch fatal unpacking error
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jan 28, 2014
1 parent e77d239 commit 30c5024
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion framework/Core/lib/Horde/Session.php
Expand Up @@ -358,7 +358,11 @@ public function get($app, $name, $mask = 0)
$value = strval($secret->read($secret->getKey(), $value));
}

return $injector->getInstance('Horde_Pack')->unpack($value);
try {
return $injector->getInstance('Horde_Pack')->unpack($value);
} catch (Horde_Pack_Exception $e) {
return null;
}
}

if ($subkeys = $this->_subkeys($app, $name)) {
Expand Down

0 comments on commit 30c5024

Please sign in to comment.