From c6c94b8cea74fcd2fb10e27c54f15508178675c1 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 2 Jun 2018 13:00:47 +0000 Subject: [PATCH] Weird stuff --- src/Model/Contact.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 84d623c3cf..f4d6f2af0e 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1699,7 +1699,7 @@ class Contact extends BaseObject { $cid = self::getIdForURL($contact_url, 0, true); if (empty($cid)) { - return ($url != '') ? $url : $contact_url; + return $url ?: $contact_url; // Equivalent to: ($url != '') ? $url : $contact_url; } return self::magicLinkbyId($cid, $url); @@ -1718,7 +1718,7 @@ class Contact extends BaseObject $contact = dba::selectFirst('contact', ['network', 'url', 'uid'], ['id' => $cid]); if ($contact['network'] != NETWORK_DFRN) { - return ($url != '') ? $url : $contact['url']; + return $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url']; } // Only redirections to the same host do make sense -- 2.39.5