mirror of
https://github.com/friendica/friendica
synced 2024-11-10 10:22:53 +00:00
Added check as suggested by @MrPetovan for empty $message.
This commit is contained in:
parent
f2b7326650
commit
962b06bf41
1 changed files with 8 additions and 0 deletions
|
@ -143,6 +143,14 @@ class HTML
|
|||
*/
|
||||
public static function toBBCode(string $message, string $basepath = ''): string
|
||||
{
|
||||
/*
|
||||
* Check if message is empty to prevent a lot code below being executed
|
||||
* for just an empty message.
|
||||
*/
|
||||
if (empty($message)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
DI::profiler()->startRecording('rendering');
|
||||
$message = str_replace("\r", "", $message);
|
||||
|
||||
|
|
Loading…
Reference in a new issue