Merge pull request #14401 from annando/issue-14373

Issue 14373: Avoid exception in BBCode parser
This commit is contained in:
Tobias Diekershoff 2024-08-27 22:35:34 +02:00 committed by GitHub
commit e676a3db15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -814,7 +814,7 @@ class BBCode
$content = preg_replace(Strings::autoLinkRegEx(), '<a href="$1">$1</a>', $match[3]); $content = preg_replace(Strings::autoLinkRegEx(), '<a href="$1">$1</a>', $match[3]);
return $match[1] . $callback($attributes, $author_contact, $content, trim($match[1]) != ''); return $match[1] . $callback($attributes, $author_contact, $content ?? '', trim($match[1]) != '');
}, },
$text $text
); );