From 2497817c2a687d10f376f27617b1da35d94d0587 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 15 Dec 2022 23:33:02 -0500 Subject: [PATCH] Ward against empty siteinfo in Text\BBCode::embedURL - Address https://github.com/friendica/friendica/issues/11994#issuecomment-1349593196 --- src/Content/Text/BBCode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 62ad04a434..9be7def903 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -2599,7 +2599,7 @@ class BBCode // Bypass attachment if parse url for a comment if (!$tryAttachment) { DI::profiler()->stopRecording(); - return "\n" . '[url=' . $url . ']' . $siteinfo['title'] . '[/url]'; + return "\n" . '[url=' . $url . ']' . ($siteinfo['title'] ?? $url) . '[/url]'; } // Format it as BBCode attachment -- 2.39.5