From b13c741cb3471f4f2df579b81e0bb5ebe56fff95 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 2 May 2017 14:12:04 +0200 Subject: Do not show an email action for contacts with emtpy email addresses Signed-off-by: Christoph Wurst --- lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php index d5630e6420d..242fbd06a22 100644 --- a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php +++ b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php @@ -52,6 +52,10 @@ class EMailProvider implements IProvider { public function process(IEntry $entry) { $iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/mail.svg')); foreach ($entry->getEMailAddresses() as $address) { + if (empty($address)) { + // Skip + continue; + } $action = $this->actionFactory->newEMailAction($iconUrl, $address, $address); $entry->addAction($action); } -- cgit v1.2.3