This commit is contained in:
2021-08-13 15:34:31 +08:00
parent cf0cae7c87
commit 0e000f3427
3 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ trait HttpHeaders
*/
public function exists($name): bool
{
return $this->_headers[$name] ?? null === null;
return ($this->_headers[$name] ?? null) === null;
}
+1 -1
View File
@@ -366,7 +366,7 @@ class Request extends HttpService implements RequestInterface
/**
* @return mixed|null
*/
public function getIp(): string|null
#[Pure] public function getIp(): string|null
{
$headers = $this->getHeaders();
if (!empty($headers['remoteip'])) return $headers['remoteip'];