From 01100c9a4aa8aa3e32b51370c6c11acb0e5e44aa Mon Sep 17 00:00:00 2001 From: Ryan Lieu Date: Fri, 14 Apr 2023 11:45:09 +0800 Subject: [PATCH] Fix: php 8.1 strtolower not allow null value (#1559) --- var/Widget/Archive.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/Widget/Archive.php b/var/Widget/Archive.php index 1ee9d39b..22dd29fe 100644 --- a/var/Widget/Archive.php +++ b/var/Widget/Archive.php @@ -1032,7 +1032,7 @@ class Archive extends Contents */ public function related(int $limit = 5, ?string $type = null): Contents { - $type = strtolower($type); + $type = strtolower($type ?? ''); switch ($type) { case 'author':