mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding fix for Ticket #1661
Fixed same issue in function cache() in basics.php git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4014 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
257ff1ef89
commit
5a74812c7b
2 changed files with 6 additions and 5 deletions
|
@ -921,9 +921,10 @@
|
|||
if (defined('DISABLE_CACHE')) {
|
||||
return null;
|
||||
}
|
||||
$now = time();
|
||||
|
||||
if (!is_numeric($expires)) {
|
||||
$expires = strtotime($expires);
|
||||
$expires = strtotime($expires, $now);
|
||||
}
|
||||
|
||||
switch(strtolower($target)) {
|
||||
|
@ -934,9 +935,9 @@
|
|||
$filename = WWW_ROOT . $path;
|
||||
break;
|
||||
}
|
||||
$now = time();
|
||||
$timediff=$expires - $now;
|
||||
$filetime=@filemtime($filename);
|
||||
|
||||
$timediff = $expires - $now;
|
||||
$filetime = @filemtime($filename);
|
||||
|
||||
if ($data == null) {
|
||||
// Read data from file
|
||||
|
|
|
@ -195,7 +195,7 @@ class CacheHelper extends AppHelper {
|
|||
if (is_numeric($timestamp)) {
|
||||
$cacheTime = $now + $timestamp;
|
||||
} else {
|
||||
$cacheTime = $now + strtotime($timestamp);
|
||||
$cacheTime = strtotime($timestamp, $now);
|
||||
}
|
||||
|
||||
$cache = convertSlash($this->here) . '.php';
|
||||
|
|
Loading…
Reference in a new issue