Replace deprecated defaults() calls by a combination of ?? and ?: operators in mod/

This commit is contained in:
Hypolite Petovan 2019-10-15 09:01:17 -04:00
commit 2db6171641
32 changed files with 186 additions and 189 deletions

View file

@ -51,9 +51,9 @@ function videos_init(App $a)
$vcard_widget = Renderer::replaceMacros($tpl, [
'$name' => $profile['name'],
'$photo' => $profile['photo'],
'$addr' => defaults($profile, 'addr', ''),
'$addr' => $profile['addr'] ?? '',
'$account_type' => $account_type,
'$pdesc' => defaults($profile, 'pdesc', ''),
'$pdesc' => $profile['pdesc'] ?? '',
]);
// If not there, create 'aside' empty