mirror of
https://github.com/friendica/friendica
synced 2025-04-27 13:10:10 +00: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
|
@ -805,7 +805,7 @@ class Post extends BaseObject
|
|||
$terms = Term::tagArrayFromItemId($this->getId(), [Term::MENTION, Term::IMPLICIT_MENTION]);
|
||||
foreach ($terms as $term) {
|
||||
$profile = Contact::getDetailsByURL($term['url']);
|
||||
if (!empty($profile['addr']) && (defaults($profile, 'contact-type', Contact::TYPE_UNKNOWN) != Contact::TYPE_COMMUNITY) &&
|
||||
if (!empty($profile['addr']) && ((($profile['contact-type'] ?? '') ?: Contact::TYPE_UNKNOWN) != Contact::TYPE_COMMUNITY) &&
|
||||
($profile['addr'] != $owner['addr']) && !strstr($text, $profile['addr'])) {
|
||||
$text .= '@' . $profile['addr'] . ' ';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue