From ae362f01d52ddf55c8310549115cef2626573934 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 30 Jan 2018 18:51:09 +0000 Subject: [PATCH] Quit if follow failes because of not configured addon --- src/Model/Contact.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 3b12dbf739..27925bfe03 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1151,6 +1151,11 @@ class Contact extends BaseObject Addon::callHooks('follow', $arr); + if (empty($arr)) { + $result['message'] = L10n::t('Contact cannot be added.'); + return $result; + } + if (x($arr['contact'], 'name')) { $ret = $arr['contact']; } else { -- 2.39.5