From: Hypolite Petovan Date: Fri, 16 Dec 2022 04:33:02 +0000 (-0500) Subject: Ward against empty siteinfo in Text\BBCode::embedURL X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2497817c2a687d10f376f27617b1da35d94d0587;p=friendica.git Ward against empty siteinfo in Text\BBCode::embedURL - Address https://github.com/friendica/friendica/issues/11994#issuecomment-1349593196 --- 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