summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/drivers/Cache_file.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-10-05 23:04:19 +0200
committerAndrey Andreev <narf@devilix.net>2014-10-05 23:04:19 +0200
commit4a485a73d64a8bebc7625aabc5fdc361d5e7dc56 (patch)
treecb18690c4de1c6ca008227260f9dd0cd2b9279d2 /system/libraries/Cache/drivers/Cache_file.php
parent39ec29585b7cdca7edc1a0757c913a13a2ee4f85 (diff)
parentd444d445ed0458a352ecb9ff79ffd158677ee805 (diff)
Merge branch 'develop' into feature/session
Diffstat (limited to 'system/libraries/Cache/drivers/Cache_file.php')
-rw-r--r--system/libraries/Cache/drivers/Cache_file.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php
index c6aa848fe..29898040a 100644
--- a/system/libraries/Cache/drivers/Cache_file.php
+++ b/system/libraries/Cache/drivers/Cache_file.php
@@ -92,7 +92,7 @@ class CI_Cache_file extends CI_Driver {
if (write_file($this->_cache_path.$id, serialize($contents)))
{
- @chmod($this->_cache_path.$id, 0660);
+ chmod($this->_cache_path.$id, 0640);
return TRUE;
}
@@ -125,7 +125,11 @@ class CI_Cache_file extends CI_Driver {
{
$data = $this->_get($id);
- if ($data === FALSE OR ! is_int($data['data']))
+ if ($data === FALSE)
+ {
+ $data = array('data' => 0, 'ttl' => 60);
+ }
+ elseif ( ! is_int($data['data']))
{
return FALSE;
}
@@ -149,7 +153,11 @@ class CI_Cache_file extends CI_Driver {
{
$data = $this->_get($id);
- if ($data === FALSE OR ! is_int($data['data']))
+ if ($data === FALSE)
+ {
+ $data = array('data' => 0, 'ttl' => 60);
+ }
+ elseif ( ! is_int($data['data']))
{
return FALSE;
}