Commit 45db39c
committed
bug symfony#46769 [HttpKernel] Fix a PHP 8.1 deprecation notice in HttpCache (mpdude)
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] Fix a PHP 8.1 deprecation notice in HttpCache
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
PHP 8.1 may trigger a deprecation notice `PHP Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in .../symfony/http-kernel/HttpCache/HttpCache.php on line 721`
The reason is that `$entry->getTtl()` may return `null` for cache entries where no freshness information is present.
I think we would err on the safe side by not using stale-while-revalidate behaviour in this case.
Commits
-------
d0955c2 [HttpKernel] Fix a PHP 8.1 deprecation notice in HttpCache1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
721 | | - | |
| 721 | + | |
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| |||
0 commit comments