mirror of
https://github.com/typecho/typecho.git
synced 2025-04-22 10:43:57 +02:00
Fix: php 8.1 strtolower not allow null value (#1559)
This commit is contained in:
parent
daef17d7eb
commit
01100c9a4a
@ -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':
|
||||
|
Loading…
x
Reference in New Issue
Block a user