提交的内容

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

9
vendor/rmccue/requests/src/Response/Headers.php vendored Executable file → Normal file
View File

@ -27,7 +27,7 @@ class Headers extends CaseInsensitiveDictionary {
* Avoid using this where commas may be used unquoted in values, such as
* Set-Cookie headers.
*
* @param string $offset
* @param string $offset Name of the header to retrieve.
* @return string|null Header value
*/
public function offsetGet($offset) {
@ -69,7 +69,7 @@ class Headers extends CaseInsensitiveDictionary {
/**
* Get all values for a given header
*
* @param string $offset
* @param string $offset Name of the header to retrieve.
* @return array|null Header values
*
* @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not valid as an array key.
@ -79,7 +79,10 @@ class Headers extends CaseInsensitiveDictionary {
throw InvalidArgument::create(1, '$offset', 'string|int', gettype($offset));
}
$offset = strtolower($offset);
if (is_string($offset)) {
$offset = strtolower($offset);
}
if (!isset($this->data[$offset])) {
return null;
}