We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 33ab90a + c039f50 commit 9d1b718Copy full SHA for 9d1b718
src/phpFastCache/Cache/ItemBaseTrait.php
@@ -174,9 +174,9 @@ public function expiresAfter($time)
174
*/
175
$time = 30 * 24 * 3600 * 5;
176
}
177
- $this->expirationDate = $this->expirationDate->add(new \DateInterval(sprintf('PT%dS', $time)));
+ $this->expirationDate = (new \DateTime())->add(new \DateInterval(sprintf('PT%dS', $time)));
178
} else if ($time instanceof \DateInterval) {
179
- $this->expirationDate = $this->expirationDate->add($time);
+ $this->expirationDate = (new \DateTime())->add($time);
180
} else {
181
throw new \InvalidArgumentException('Invalid date format');
182
0 commit comments