Suppress undefined index nickname notice in Model\Profile::sidebar
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 12 Jun 2019 19:34:56 +0000 (15:34 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 31 Dec 2019 17:25:39 +0000 (12:25 -0500)
src/Model/Profile.php

index 765fed7..4bb8868 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);