summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-07-02 14:48:35 +0200
committerAndrey Andreev <narf@bofh.bg>2012-07-02 14:48:35 +0200
commitbd0b4b306fd9995e19c333eb9b55806e9b56f34c (patch)
tree26a5ba25d8c10bf40f22a46ee965f1cf9177f143
parentc955acfe23f25efa0b64596cb463893aff4f11d7 (diff)
Fix issue #1543
-rw-r--r--system/libraries/Cache/drivers/Cache_file.php11
-rw-r--r--user_guide/changelog.html8
2 files changed, 13 insertions, 6 deletions
diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php
index c50043660..e515eebf1 100644
--- a/system/libraries/Cache/drivers/Cache_file.php
+++ b/system/libraries/Cache/drivers/Cache_file.php
@@ -151,13 +151,12 @@ class CI_Cache_file extends CI_Driver {
{
return FALSE;
}
-
- $data = read_file($this->_cache_path.$id);
+
+ $data = read_file($this->_cache_path.$id);
$data = unserialize($data);
-
+
if (is_array($data))
{
- $data = $data['data'];
$mtime = filemtime($this->_cache_path.$id);
if ( ! isset($data['ttl']))
@@ -166,11 +165,11 @@ class CI_Cache_file extends CI_Driver {
}
return array(
- 'expire' => $mtime + $data['ttl'],
+ 'expire' => $mtime + $data['ttl'],
'mtime' => $mtime
);
}
-
+
return FALSE;
}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index a8f69af36..c3a7e4c2a 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -57,6 +57,14 @@ Change Log
<h1>Change Log</h1>
+<h2>Version 2.1.3</h2>
+<p>Release Date: Not Released</p>
+
+<h3>Bug fixes for 2.1.3:</h3>
+<ul>
+ <li>Fixed a bug (#1543) - <a href="libraries/caching.html#file">File-based Caching</a> method <samp>get_metadata()</samp> used a non-existent array key to look for the TTL value.</li>
+</ul>
+
<h2>Version 2.1.2</h2>
<p>Release Date: June 29, 2012</p>