8000 [HttpKernel] Fix a PHP 8.1 deprecation notice in HttpCache · symfony/http-kernel@546634a · GitHub
[go: up one dir, main page]

Skip to content

Commit 546634a

Browse files
mpdudenicolas-grekas
authored andcommitted
[HttpKernel] Fix a PHP 8.1 deprecation notice in HttpCache
1 parent 0939810 commit 546634a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HttpCache/HttpCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ private function mayServeStaleWhileRevalidate(Response $entry): bool
718718
$timeout = $this->options['stale_while_revalidate'];
719719
}
720720

721-
return abs($entry->getTtl()) < $timeout;
721+
return abs($entry->getTtl() ?? 0) < $timeout;
722722
}
723723

724724
/**

0 commit comments

Comments
 (0)
0