Skip to content
Snippets Groups Projects
Commit 44df3dce authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #695 from owncloud/fix-contacts-integration

Fix undefined index - fixes #656
parents f3afcf8a f6b0988e
No related branches found
No related tags found
No related merge requests found
......@@ -12,13 +12,18 @@
namespace OCA\Mail\Service;
use OCP\Contacts\IManager;
class ContactsIntegration {
/**
* @var \OCP\Contacts\IManager
* @var IManager
*/
private $contactsManager;
/**
* @param IManager $contactsManager
*/
public function __construct($contactsManager) {
$this->contactsManager = $contactsManager;
}
......@@ -39,6 +44,9 @@ class ContactsIntegration {
foreach ($result as $r) {
$id = $r['id'];
$fn = $r['FN'];
if (!isset($r['EMAIL'])) {
continue;
}
$email = $r['EMAIL'];
if (!is_array($email)) {
$email = [$email];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment