Skip to content

Commit adb6275

Browse files
Merge branch '7.3' into 7.4
* 7.3: Fix ord()-related PHP 8.5 deprecations [FrameworkBundle] Perform-no-deep-merging on workflow transitions' from/to configs [HttpKernel] Refine Vary header check to skip special handling of 'Accept-Language' when it's the only entry and '_vary_by_language' is `true` in `CacheAttributeListener` [PropertyInfo] Fix getting type from constructor of parent class in PhpStanExtractor
2 parents 7caeebb + b1b828f commit adb6275

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Encoder/QpContentEncoder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ private function standardize(string $string): string
4646
// transform =0D=0A to CRLF
4747
$string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], ["=09\r\n", "=20\r\n", "\r\n"], $string);
4848

49-
return match (\ord(substr($string, -1))) {
50-
0x09 => substr_replace($string, '=09', -1),
51-
0x20 => substr_replace($string, '=20', -1),
49+
return match ($string[-1] ?? '') {
50+
"\x09" => substr_replace($string, '=09', -1),
51+
"\x20" => substr_replace($string, '=20', -1),
5252
default => $string,
5353
};
5454
}

Encoder/QpEncoder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ private function standardize(string $string): string
183183
{
184184
$string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], ["=09\r\n", "=20\r\n", "\r\n"], $string);
185185

186-
return match ($end = \ord(substr($string, -1))) {
187-
0x09,
188-
0x20 => substr_replace($string, self::QP_MAP[$end], -1),
186+
return match ($end = ($string[-1] ?? '')) {
187+
"\x09",
188+
"\x20" => substr_replace($string, self::QP_MAP[\ord($end)], -1),
189189
default => $string,
190190
};
191191
}

0 commit comments

Comments
 (0)