]> git.mxchange.org Git - friendica.git/commitdiff
Quit if follow failes because of not configured addon
authorMichael <heluecht@pirati.ca>
Tue, 30 Jan 2018 18:51:09 +0000 (18:51 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 30 Jan 2018 18:51:09 +0000 (18:51 +0000)
src/Model/Contact.php

index 3b12dbf73966dbd4b0e76bc61834cd563c9ff5e6..27925bfe038b92725c465b83f191defe2d86bb6a 100644 (file)
@@ -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 {