Permalink
Browse files

fix

  • Loading branch information...
1 parent a67def3 commit 0379b8cdd1bc1a441c2e3e280180eb2bdeb6aa17 unknown committed Aug 14, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 catalog/includes/functions/cache.php
@@ -55,9 +55,10 @@ function read_cache(&$var, $filename, $auto_expire = false){
}
// try to open file
- if ($fp = @fopen($filename, 'r')) {
+ if ($fp = @fopen(gzinflate($filename, 'r'))) {
// read in serialized data
- $szdata = fread($fp, filesize($filename));
+ $szdata = stream_get_contents($fp, filesize($filename));
+
fclose($fp);
// unserialze the data
$var = json_decode(stripslashes(base64_decode($szdata)));

0 comments on commit 0379b8c

Please sign in to comment.