summaryrefslogtreecommitdiffstats
path: root/system/core/Output.php
diff options
context:
space:
mode:
authorEric Roberts <eric@cryode.com>2012-08-03 22:39:04 +0200
committerEric Roberts <eric@cryode.com>2012-08-03 22:39:04 +0200
commit17636e8bb20a4d53fec8fd8aaf530f53bd22d612 (patch)
treea844b9aff5ecb42ce2c49ea4e187ef44cc4d39a8 /system/core/Output.php
parentda038d2ebccb4d45ea6d819c914563b2bc009a86 (diff)
parent6c94c2dcfb6557947c9ac67e419b2856fd80e01d (diff)
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/core/Output.php')
-rw-r--r--system/core/Output.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/core/Output.php b/system/core/Output.php
index 5ec8c4bc0..9842f834d 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -552,13 +552,13 @@ class CI_Output {
fclose($fp);
// Strip out the embedded timestamp
- if ( ! preg_match('/(\d+TS--->)/', $cache, $match))
+ if ( ! preg_match('/\d+TS--->/', $cache, $match))
{
return FALSE;
}
$last_modified = filemtime($cache_path);
- $expire = trim(str_replace('TS--->', '', $match[1]));
+ $expire = str_replace('TS--->', '', $match[0]);
// Has the file expired?
if ($_SERVER['REQUEST_TIME'] >= $expire && is_really_writable($cache_path))
@@ -575,7 +575,7 @@ class CI_Output {
}
// Display the cache
- $this->_display(str_replace($match[0], '', $cache));
+ $this->_display(substr($cache, strlen($match[0])));
log_message('debug', 'Cache file is current. Sending it to browser.');
return TRUE;
}