Replace deprecated defaults() calls by a combination of ?? and ?: operators in mod/
This commit is contained in:
parent
8998926e5b
commit
2db6171641
32 changed files with 186 additions and 189 deletions
|
@ -78,8 +78,8 @@ function notifications_content(App $a)
|
|||
return Login::form();
|
||||
}
|
||||
|
||||
$page = defaults($_REQUEST, 'page', 1);
|
||||
$show = defaults($_REQUEST, 'show', 0);
|
||||
$page = ($_REQUEST['page'] ?? 0) ?: 1;
|
||||
$show = $_REQUEST['show'] ?? 0;
|
||||
|
||||
Nav::setSelected('notifications');
|
||||
|
||||
|
@ -158,7 +158,7 @@ function notifications_content(App $a)
|
|||
];
|
||||
|
||||
// Process the data for template creation
|
||||
if (defaults($notifs, 'ident', '') === 'introductions') {
|
||||
if (($notifs['ident'] ?? '') == 'introductions') {
|
||||
$sugg = Renderer::getMarkupTemplate('suggestions.tpl');
|
||||
$tpl = Renderer::getMarkupTemplate('intros.tpl');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue