提交的内容

This commit is contained in:
2025-05-12 15:45:02 +08:00
parent 629c4750da
commit b48c692775
3043 changed files with 34732 additions and 60810 deletions

6
vendor/guzzlehttp/uri-template/src/UriTemplate.php vendored Executable file → Normal file
View File

@ -7,7 +7,7 @@ namespace GuzzleHttp\UriTemplate;
/**
* Expands URI templates. Userland implementation of PECL uri_template.
*
* @link http://tools.ietf.org/html/rfc6570
* @see https://datatracker.ietf.org/doc/html/rfc6570
*/
final class UriTemplate
{
@ -132,7 +132,6 @@ final class UriTemplate
continue;
}
/** @var mixed */
$variable = $variables[$value['value']];
$actuallyUseQuery = $useQuery;
$expanded = '';
@ -170,7 +169,6 @@ final class UriTemplate
}
/** @var string $var */
$kvp[$key] = $var;
}
@ -207,7 +205,7 @@ final class UriTemplate
}
if ($actuallyUseQuery) {
if (!$expanded && $joiner !== '&') {
if ($expanded === '' && $joiner !== '&') {
$expanded = $value['value'];
} else {
$expanded = \sprintf('%s=%s', $value['value'], $expanded);