From 0f0d636a47907bdb9826f513a553a8b1a30853f9 Mon Sep 17 00:00:00 2001 From: Maurice Renck Date: Thu, 28 Nov 2024 16:28:50 +0100 Subject: [PATCH] fix: allow empty author --- lib/WebmentionStats.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/WebmentionStats.php b/lib/WebmentionStats.php index da741b3..a66f8c3 100644 --- a/lib/WebmentionStats.php +++ b/lib/WebmentionStats.php @@ -23,7 +23,7 @@ public function trackMention( string $source, string $type, ?string $image, - string $author, + ?string $author, string $title ) { if ($this->doNotTrackHost($source)) { @@ -36,6 +36,10 @@ public function trackMention( $mentionDate = $this->indieDb->getFormattedDate(); + if (is_null($author)) { + $author = ''; + } + if (is_null($image)) { $image = ''; }