]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Profile.php
Yeah, and again notices ... (#5536)
[friendica.git] / src / Model / Profile.php
index 9d1b002a7911ac5a53294b08f584e1853b69e02a..3ac147396dd94f20d3caf5e0b9ff3db33d1548d0 100644 (file)
@@ -199,7 +199,7 @@ class Profile
         */
        public static function getByNickname($nickname, $uid = 0, $profile_id = 0)
        {
-               if (remote_user() && count($_SESSION['remote'])) {
+               if (remote_user() && !empty($_SESSION['remote'])) {
                        foreach ($_SESSION['remote'] as $visitor) {
                                if ($visitor['uid'] == $uid) {
                                        $contact = DBA::selectFirst('contact', ['profile-id'], ['id' => $visitor['cid']]);
@@ -293,7 +293,7 @@ class Profile
                $connect = $profile['uid'] != local_user() ? L10n::t('Connect') : false;
 
                // don't show connect link to authenticated visitors either
-               if (remote_user() && count($_SESSION['remote'])) {
+               if (remote_user() && !empty($_SESSION['remote'])) {
                        foreach ($_SESSION['remote'] as $visitor) {
                                if ($visitor['uid'] == $profile['uid']) {
                                        $connect = false;