fix nullable parameter error

This commit is contained in:
joyqi
2025-06-05 14:34:22 +08:00
parent 5ef475b73f
commit db8a3f7f3e
2 changed files with 2 additions and 2 deletions

View File

@@ -245,7 +245,7 @@ class Request
* @param string|null $default
* @return string|null
*/
public function getServer(string $name, string $default = null): ?string
public function getServer(string $name, ?string $default = null): ?string
{
return $this->request->getServer($name, $default);
}

View File

@@ -184,7 +184,7 @@ class Response
* @param string|null $suffix 附加地址
* @param string|null $default 默认来路
*/
public function goBack(string $suffix = null, string $default = null)
public function goBack(?string $suffix = null, ?string $default = null)
{
//获取来源
$referer = $this->request->getReferer();