diff --git a/var/Typecho/Request.php b/var/Typecho/Request.php index 6c434f39..473110f4 100644 --- a/var/Typecho/Request.php +++ b/var/Typecho/Request.php @@ -377,7 +377,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 $_SERVER[$name] ?? $default; } diff --git a/var/Widget/Feed.php b/var/Widget/Feed.php index 450927aa..7754f3c9 100644 --- a/var/Widget/Feed.php +++ b/var/Widget/Feed.php @@ -41,7 +41,7 @@ class Feed extends Contents */ public function execute() { - $feedPath = $this->request->get('feed'); + $feedPath = $this->request->get('feed', '/'); $feedType = FeedGenerator::RSS2; $feedContentType = 'application/rss+xml'; $currentFeedUrl = $this->options->feedUrl;