Silence decompression errors
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 15 Oct 2010 20:01:50 +0000 (14:01 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 15 Oct 2010 20:02:39 +0000 (14:02 -0600)
framework/Core/lib/Horde/Session.php

index 993276c..a01f5e6 100644 (file)
@@ -302,8 +302,10 @@ class Horde_Session implements ArrayAccess
             return $data;
         }
 
-        if ($this->_lzf) {
-            $data = lzf_decompress($data);
+        if ($this->_lzf &&
+            (($data = @lzf_decompress($data)) === false)) {
+            unset($this[$offset]);
+            return $this[$offset];
         }
 
         return ($_SESSION[self::SERIALIZED][$ob->key] == 's')