Skip to content

Commit

Permalink
Merge pull request #25 from typecho/master
Browse files Browse the repository at this point in the history
Fix: php 8.1 strtolower not allow null value (typecho#1559)
  • Loading branch information
penndu committed May 15, 2023
2 parents daef17d + 01100c9 commit b7773d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion var/Widget/Archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ public function thePrev($format = '%s', $default = null, $custom = [])
*/
public function related(int $limit = 5, ?string $type = null): Contents
{
$type = strtolower($type);
$type = strtolower($type ?? '');

switch ($type) {
case 'author':
Expand Down

0 comments on commit b7773d0

Please sign in to comment.