From 6a575740912817ad4b38aab24d76f38de89239b1 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 5 Aug 2018 15:56:41 +0200 Subject: [PATCH] Fix missing $profile['nickname'] in Model\Profile --- src/Model/Profile.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 8d859b7905..550d064757 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -336,9 +336,11 @@ class Profile $subscribe_feed = false; } + $wallmessage = false; + $wallmessage_link = false; + if (remote_user() || (self::getMyURL() && x($profile, 'unkmail') && ($profile['uid'] != local_user()))) { $wallmessage = L10n::t('Message'); - $wallmessage_link = 'wallmessage/' . $profile['nickname']; if (remote_user()) { $r = q( @@ -359,10 +361,9 @@ class Profile $remote_url = $r[0]['url']; $message_path = preg_replace('=(.*)/profile/(.*)=ism', '$1/message/new/', $remote_url); $wallmessage_link = $message_path . base64_encode($profile['addr']); + } else if (!empty($profile['nickname'])) { + $wallmessage_link = 'wallmessage/' . $profile['nickname']; } - } else { - $wallmessage = false; - $wallmessage_link = false; } // show edit profile to yourself -- 2.39.5