Merge pull request #14289 from annando/fatal

Prevent fatal error
This commit is contained in:
Tobias Diekershoff 2024-07-12 08:17:04 +02:00 committed by GitHub
commit a4cc49f0d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1364,7 +1364,7 @@ class BBCode
// At a later stage we won't be able to exclude certain parts of the code.
$text = self::performWithEscapedTags($text, ['url', 'img', 'audio', 'video', 'youtube', 'vimeo', 'share', 'attachment', 'iframe', 'bookmark', 'map', 'oembed'], function ($text) use ($simple_html, $for_plaintext) {
if (!$for_plaintext) {
$text = preg_replace(Strings::autoLinkRegEx(), '[url]$1[/url]', $text);
$text = preg_replace(Strings::autoLinkRegEx(), '[url]$1[/url]', $text) ?? '';
}
return self::convertSmileysToHtml($text, $simple_html, $for_plaintext);
});