Skip to content

Commit 77e6052

Browse files
committed
Merge branch '5.1' into 5.x
2 parents db41852 + 543cdc8 commit 77e6052

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

BinaryFileResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public function prepare(Request $request)
217217
// @link https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/#x-accel-redirect
218218
$parts = HeaderUtils::split($request->headers->get('X-Accel-Mapping', ''), ',=');
219219
foreach ($parts as $part) {
220-
list($pathPrefix, $location) = $part;
220+
[$pathPrefix, $location] = $part;
221221
if (substr($path, 0, \strlen($pathPrefix)) === $pathPrefix) {
222222
$path = $location.substr($path, \strlen($pathPrefix));
223223
// Only set X-Accel-Redirect header if a valid URI can be produced
@@ -237,7 +237,7 @@ public function prepare(Request $request)
237237
$range = $request->headers->get('Range');
238238

239239
if (0 === strpos($range, 'bytes=')) {
240-
list($start, $end) = explode('-', substr($range, 6), 2) + [0];
240+
[$start, $end] = explode('-', substr($range, 6), 2) + [0];
241241

242242
$end = ('' === $end) ? $fileSize - 1 : (int) $end;
243243

IpUtils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static function checkIp4(?string $requestIp, string $ip)
7171
}
7272

7373
if (false !== strpos($ip, '/')) {
74-
list($address, $netmask) = explode('/', $ip, 2);
74+
[$address, $netmask] = explode('/', $ip, 2);
7575

7676
if ('0' === $netmask) {
7777
return self::$checkedIps[$cacheKey] = filter_var($address, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4);
@@ -118,7 +118,7 @@ public static function checkIp6(?string $requestIp, string $ip)
118118
}
119119

120120
if (false !== strpos($ip, '/')) {
121-
list($address, $netmask) = explode('/', $ip, 2);
121+
[$address, $netmask] = explode('/', $ip, 2);
122122

123123
if ('0' === $netmask) {
124124
return (bool) unpack('n*', @inet_pton($address));

ServerBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function getHeaders()
6666
// Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic
6767
$exploded = explode(':', base64_decode(substr($authorizationHeader, 6)), 2);
6868
if (2 == \count($exploded)) {
69-
list($headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']) = $exploded;
69+
[$headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']] = $exploded;
7070
}
7171
} elseif (empty($this->parameters['PHP_AUTH_DIGEST']) && (0 === stripos($authorizationHeader, 'digest '))) {
7272
// In some circumstances PHP_AUTH_DIGEST needs to be set

0 commit comments

Comments
 (0)