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
parent 8998926e5b
commit 2db6171641
32 changed files with 186 additions and 189 deletions

View file

@ -276,8 +276,8 @@ function display_content(App $a, $update = false, $update_uid = 0)
if (isset($item_parent_uri)) {
$parent = Item::selectFirst(['uid'], ['uri' => $item_parent_uri, 'wall' => true]);
if (DBA::isResult($parent)) {
$a->profile['uid'] = defaults($a->profile, 'uid', $parent['uid']);
$a->profile['profile_uid'] = defaults($a->profile, 'profile_uid', $parent['uid']);
$a->profile['uid'] = ($a->profile['uid'] ?? 0) ?: $parent['uid'];
$a->profile['profile_uid'] = ($a->profile['profile_uid'] ?? 0) ?: $parent['uid'];
$is_remote_contact = Session::getRemoteContactID($a->profile['profile_uid']);
if ($is_remote_contact) {
$item_uid = $parent['uid'];