Skip to content

Commit f1f9028

Browse files
committed
Make sure that $lifetime is >= 300
1 parent e1d71a8 commit f1f9028

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

wcfsetup/install/files/lib/system/cache/tolerant/AbstractTolerantCache.class.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,19 @@ abstract protected function rebuildCacheData(): array|object;
9999

100100
final public function nextRebuildTime(): int
101101
{
102+
$lifetime = $this->getLifetime();
103+
\assert($lifetime >= 300);
104+
102105
$cacheTime = CacheHandler::getInstance()->getCacheSource()->getCreationTime(
103106
$this->getCacheKey(),
104-
$this->getLifetime()
107+
$lifetime
105108
);
106109

107110
if ($cacheTime === null) {
108111
return \TIME_NOW;
109112
}
110113

111-
return $cacheTime + $this->getLifetime();
114+
return $cacheTime + $lifetime;
112115
}
113116

114117
/**

0 commit comments

Comments
 (0)