Ward against empty siteinfo in Text\BBCode::embedURL

- Address https://github.com/friendica/friendica/issues/11994#issuecomment-1349593196
This commit is contained in:
Hypolite Petovan 2022-12-15 23:33:02 -05:00
parent 060936d31e
commit 2497817c2a
1 changed files with 1 additions and 1 deletions

View File

@ -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