mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-18 17:21:26 +08:00
one more revert.
This commit is contained in:
@ -955,8 +955,7 @@ class Request extends \yii\base\Request
|
|||||||
$n = preg_match_all('/\s*([\w\/\-\*]+)\s*(?:;\s*q\s*=\s*([\d\.]+))?[^,]*/', $header, $matches, PREG_SET_ORDER);
|
$n = preg_match_all('/\s*([\w\/\-\*]+)\s*(?:;\s*q\s*=\s*([\d\.]+))?[^,]*/', $header, $matches, PREG_SET_ORDER);
|
||||||
for ($i = 0; $i < $n; ++$i) {
|
for ($i = 0; $i < $n; ++$i) {
|
||||||
if (!empty($matches[$i][1])) {
|
if (!empty($matches[$i][1])) {
|
||||||
$accepts[] = [$matches[$i][1], isset($matches[$i][2]) ? (float)$matches[$i][2] : 1,
|
$accepts[] = [$matches[$i][1], isset($matches[$i][2]) ? (float)$matches[$i][2] : 1, $i];
|
||||||
$i];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
usort($accepts, function ($a, $b) {
|
usort($accepts, function ($a, $b) {
|
||||||
|
Reference in New Issue
Block a user