mirror of
https://github.com/friendica/friendica
synced 2025-04-30 00:24:24 +02:00
Replace deprecated calls to defaults() by ?? and ?: in src/
This commit is contained in:
parent
c0b78a9720
commit
146646c4d4
41 changed files with 239 additions and 233 deletions
|
@ -90,7 +90,7 @@ class ItemContent extends BaseObject
|
|||
}
|
||||
}
|
||||
|
||||
$html = Text\BBCode::convert($post['text'] . defaults($post, 'after', ''), false, $htmlmode);
|
||||
$html = Text\BBCode::convert($post['text'] . ($post['after'] ?? ''), false, $htmlmode);
|
||||
$msg = Text\HTML::toPlaintext($html, 0, true);
|
||||
$msg = trim(html_entity_decode($msg, ENT_QUOTES, 'UTF-8'));
|
||||
|
||||
|
@ -99,7 +99,7 @@ class ItemContent extends BaseObject
|
|||
if ($post['type'] == 'link') {
|
||||
$link = $post['url'];
|
||||
} elseif ($post['type'] == 'text') {
|
||||
$link = defaults($post, 'url', '');
|
||||
$link = $post['url'] ?? '';
|
||||
} elseif ($post['type'] == 'video') {
|
||||
$link = $post['url'];
|
||||
} elseif ($post['type'] == 'photo') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue