mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-10 08:53:57 +09:00
Updates to vendors etc
This commit is contained in:
10
vendor/symfony/http-foundation/HeaderUtils.php
vendored
10
vendor/symfony/http-foundation/HeaderUtils.php
vendored
@@ -34,7 +34,7 @@ class HeaderUtils
|
||||
* Example:
|
||||
*
|
||||
* HeaderUtils::split('da, en-gb;q=0.8', ',;')
|
||||
* // => ['da'], ['en-gb', 'q=0.8']]
|
||||
* # returns [['da'], ['en-gb', 'q=0.8']]
|
||||
*
|
||||
* @param string $separators List of characters to split on, ordered by
|
||||
* precedence, e.g. ',', ';=', or ',;='
|
||||
@@ -165,7 +165,7 @@ class HeaderUtils
|
||||
public static function makeDisposition(string $disposition, string $filename, string $filenameFallback = ''): string
|
||||
{
|
||||
if (!\in_array($disposition, [self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE])) {
|
||||
throw new \InvalidArgumentException(sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE));
|
||||
throw new \InvalidArgumentException(\sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE));
|
||||
}
|
||||
|
||||
if ('' === $filenameFallback) {
|
||||
@@ -286,7 +286,11 @@ class HeaderUtils
|
||||
}
|
||||
|
||||
foreach ($partMatches as $matches) {
|
||||
$parts[] = '' === $separators ? self::unquote($matches[0][0]) : self::groupParts($matches, $separators, false);
|
||||
if ('' === $separators && '' !== $unquoted = self::unquote($matches[0][0])) {
|
||||
$parts[] = $unquoted;
|
||||
} elseif ($groupedParts = self::groupParts($matches, $separators, false)) {
|
||||
$parts[] = $groupedParts;
|
||||
}
|
||||
}
|
||||
|
||||
return $parts;
|
||||
|
||||
Reference in New Issue
Block a user