]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Profile.php
Merge pull request #8071 from nupplaphil/task/Lock_to_lock
[friendica.git] / src / Model / Profile.php
index 765fed791a35f6afaf7698fafa58dfc8452ec160..d7cc906fdbc5a5b49b5707e5a6642df00b4cf4f0 100644 (file)
@@ -369,7 +369,9 @@ class Profile
 
                if (!$local_user_is_self && $show_connect) {
                        if (!$visitor_is_authenticated) {
-                               $follow_link = 'dfrn_request/' . $profile['nickname'];
+                               if (!empty($profile['nickname'])) {
+                                       $follow_link = 'dfrn_request/' . $profile['nickname'];
+                               }
                        } elseif ($profile_is_native) {
                                if ($visitor_is_following) {
                                        $unfollow_link = $visitor_base_path . '/unfollow?url=' . urlencode($profile_url);
@@ -566,7 +568,7 @@ class Profile
 
        public static function getBirthdays()
        {
-               $a = \get_app();
+               $a = DI::app();
                $o = '';
 
                if (!local_user() || DI::mode()->isMobile() || DI::mode()->isMobile()) {
@@ -663,7 +665,7 @@ class Profile
 
        public static function getEventsReminderHTML()
        {
-               $a = \get_app();
+               $a = DI::app();
                $o = '';
 
                if (!local_user() || DI::mode()->isMobile() || DI::mode()->isMobile()) {
@@ -1104,7 +1106,7 @@ class Profile
         */
        public static function addVisitorCookieForHandle($handle)
        {
-               $a = \get_app();
+               $a = DI::app();
 
                // Try to find the public contact entry of the visitor.
                $cid = Contact::getIdForURL($handle);
@@ -1142,7 +1144,7 @@ class Profile
         */
        public static function openWebAuthInit($token)
        {
-               $a = \get_app();
+               $a = DI::app();
 
                // Clean old OpenWebAuthToken entries.
                OpenWebAuthToken::purge('owt', '3 MINUTE');