Skip to content

Commit d0955c2

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpKernel/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)