提交的内容
This commit is contained in:
6
vendor/guzzlehttp/uri-template/src/UriTemplate.php
vendored
Executable file → Normal file
6
vendor/guzzlehttp/uri-template/src/UriTemplate.php
vendored
Executable file → Normal 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);
|
||||
|
||||
Reference in New Issue
Block a user