From 64026ed979efa38a3f092e1546fbbfd953cf66c0 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 19 Jul 2021 12:07:02 +0000 Subject: [PATCH] Simplify code --- src/Model/Contact.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index c68039643..20135a49e 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -455,9 +455,7 @@ class Contact { if (!parse_url($url, PHP_URL_SCHEME)) { $addr_parts = explode('@', $url); - if (count($addr_parts) == 2) { - return $addr_parts[1] == DI::baseUrl()->getHostname(); - } + return (count($addr_parts) == 2) && ($addr_parts[1] == DI::baseUrl()->getHostname()); } return Strings::compareLink(self::getBasepath($url, true), DI::baseUrl());