summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-09-17 12:07:34 +0200
committerAndrey Andreev <narf@bofh.bg>2012-09-17 12:07:34 +0200
commit4c81b72554f2dbac1159442965e7d0760b592e33 (patch)
tree084144197bca37061ca6731370063a1b96f27f28 /system
parent4a853e206fe36126594d4ea3fd415db00264187d (diff)
parent239e0e598f0b9462e195db5da658095eb70cf6e3 (diff)
Merge pull request #1806 from vlakoff/develop-2
Better method for getting Output cache file embedded timestamp
Diffstat (limited to 'system')
-rw-r--r--system/core/Output.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/core/Output.php b/system/core/Output.php
index 9842f834d..052367ed6 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 = str_replace('TS--->', '', $match[0]);
+ $expire = $match[1];
// Has the file expired?
if ($_SERVER['REQUEST_TIME'] >= $expire && is_really_writable($cache_path))