Upgrade to 3.9.5

This commit is contained in:
Bastian Allgeier
2023-06-07 14:12:49 +02:00
parent 38c8ba7e59
commit f76fbaa53e
49 changed files with 625 additions and 633 deletions

View File

@@ -377,8 +377,8 @@ class Environment
$data['https'] = $this->detectHttpsProtocol($fields['proto']);
}
if ($data['port'] === null && $data['https'] === true) {
$data['port'] = 443;
if ($data['https'] === true) {
$data['port'] ??= 443;
}
$data['for'] = $parts['for'] ?? null;

View File

@@ -195,7 +195,7 @@ class Request
*/
public function data(): array
{
return array_merge($this->body()->toArray(), $this->query()->toArray());
return array_replace($this->body()->toArray(), $this->query()->toArray());
}
/**
@@ -210,8 +210,8 @@ class Request
// the request method can be overwritten with a header
$methodOverride = strtoupper(Environment::getGlobally('HTTP_X_HTTP_METHOD_OVERRIDE', ''));
if ($method === null && in_array($methodOverride, $methods) === true) {
$method = $methodOverride;
if (in_array($methodOverride, $methods) === true) {
$method ??= $methodOverride;
}
// final chain of options to detect the method