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'];
-1
View File
@@ -524,7 +524,6 @@ class Router extends HttpService implements RouterInterface
* @param RequestInterface $request
* @return Node|null
* 树杈搜索
* @throws RequestException
*/
public function Branch_search(RequestInterface $request): ?Node
{