Replace deprecated calls to defaults() by ?? and ?: in src/
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user