mirror of
https://github.com/typecho/typecho.git
synced 2025-04-14 06:41:53 +02:00
fix #1157
This commit is contained in:
parent
a3d698c09e
commit
fa222ba7a2
@ -70,10 +70,10 @@ class Security extends Base
|
||||
/**
|
||||
* 获取token
|
||||
*
|
||||
* @param string $suffix 后缀
|
||||
* @param string|null $suffix 后缀
|
||||
* @return string
|
||||
*/
|
||||
public function getToken(string $suffix): string
|
||||
public function getToken(?string $suffix): string
|
||||
{
|
||||
return md5($this->token . '&' . $suffix);
|
||||
}
|
||||
@ -81,10 +81,10 @@ class Security extends Base
|
||||
/**
|
||||
* 获取绝对路由路径
|
||||
*
|
||||
* @param $path
|
||||
* @param string|null $path
|
||||
* @return string
|
||||
*/
|
||||
public function getRootUrl($path): string
|
||||
public function getRootUrl(?string $path): string
|
||||
{
|
||||
return Common::url($this->getTokenUrl($path), $this->options->rootUrl);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user