From ecfd6b5ad29d721a39742ca6e46541a89ac7bf81 Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Sat, 19 Feb 2022 05:29:00 +0000 Subject: [PATCH] [PLUGIN][ActivityPub][Model][Note] Sometimes content is explicitely null --- plugins/ActivityPub/Util/Model/Note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ActivityPub/Util/Model/Note.php b/plugins/ActivityPub/Util/Model/Note.php index 299c55fde6..713eeb8584 100644 --- a/plugins/ActivityPub/Util/Model/Note.php +++ b/plugins/ActivityPub/Util/Model/Note.php @@ -146,7 +146,7 @@ class Note extends Model 'is_local' => false, 'created' => new DateTime($type_note->get('published') ?? 'now'), 'content' => $type_note->get('content') ?? null, - 'rendered' => $type_note->has('content') ? HTML::sanitize($type_note->get('content')) : null, + 'rendered' => is_null($type_note->get('content')) ? null : HTML::sanitize($type_note->get('content')), 'title' => $type_note->get('name') ?? null, 'content_type' => 'text/html', 'language_id' => $type_note->get('contentLang') ?? null,