8000 bug #40188 [HttpFoundation] Fix PHP 8.1 null values (kylekatarnls) · symfony/symfony@eab9155 · GitHub
[go: up one dir, main page]

Skip to content

Commit eab9155

Browse files
committed
bug #40188 [HttpFoundation] Fix PHP 8.1 null values (kylekatarnls)
This PR was merged into the 4.4 branch. Discussion ---------- [HttpFoundation] Fix PHP 8.1 null values | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Both `stripos` and `preg_match` will no longer accept `null` on PHP >= 8.1 Commits ------- 419e220 Fix PHP 8.1 null values
2 parents aad1d09 + 419e220 commit eab9155

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ public static function closeOutputBuffers(int $targetLevel, bool $flush): void
12371237
*/
12381238
protected function ensureIEOverSSLCompatibility(Request $request): void
12391239
{
1240-
if (false !== stripos($this->headers->get('Content-Disposition'), 'attachment') && 1 == preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT'), $match) && true === $request->isSecure()) {
1240+
if (false !== stripos($this->headers->get('Content-Disposition') ?? '', 'attachment') && 1 == preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT') ?? '', $match) && true === $request->isSecure()) {
12411241
if ((int) preg_replace('/(MSIE )(.*?);/', '$2', $match[0]) < 9) {
12421242
$this->headers->remove('Cache-Control');
12431243
}

0 commit comments

Comments
 (0)
0