From: Chuck Hagenbuch Date: Tue, 9 Nov 2010 18:48:33 +0000 (-0500) Subject: Don't leak errors from unserialize X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=baeb22e09d40ab70bbed7ad5cbacbf8f7f6d96b4;p=horde.git Don't leak errors from unserialize --- diff --git a/ansel/lib/Storage.php b/ansel/lib/Storage.php index 2bca772ce..9d71991fc 100644 --- a/ansel/lib/Storage.php +++ b/ansel/lib/Storage.php @@ -297,7 +297,8 @@ class Ansel_Storage if (!count($overrides) && $GLOBALS['conf']['ansel_cache']['usecache'] && ($gallery = $GLOBALS['injector']->getInstance('Horde_Cache')->get('Ansel_Gallery' . $gallery_id, $GLOBALS['conf']['cache']['default_lifetime'])) !== false) { - return unserialize($gallery); + $cached_gallery = @unserialize($gallery); + if ($cached_gallery) { return $cached_gallery; } } try {