Fix: php 8.1 strtolower not allow null value (#1559)

This commit is contained in:
Ryan Lieu
2023-04-14 11:45:09 +08:00
committed by GitHub
parent daef17d7eb
commit 01100c9a4a
+1 -1
View File
@@ -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':