mirror of
https://github.com/friendica/friendica
synced 2025-04-25 15:10:13 +00:00
Add null/empty string parameter value case in BBCode::convert
- Remove obsolete coalesce operator uses
This commit is contained in:
parent
0c1e876ee0
commit
89b3ae2657
6 changed files with 11 additions and 6 deletions
|
@ -1252,8 +1252,13 @@ class BBCode
|
|||
* @return string
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function convert($text, $try_oembed = true, $simple_html = self::INTERNAL, $for_plaintext = false)
|
||||
public static function convert(string $text = null, $try_oembed = true, $simple_html = self::INTERNAL, $for_plaintext = false)
|
||||
{
|
||||
// Accounting for null default column values
|
||||
if (is_null($text) || $text === '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
$a = DI::app();
|
||||
|
||||
$text = self::performWithEscapedTags($text, ['code'], function ($text) use ($try_oembed, $simple_html, $for_plaintext, $a) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue