From: Roland Häder Date: Mon, 24 Oct 2022 16:27:38 +0000 (+0200) Subject: Fixed: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=54b89365bb19b34fd540e0705eb92ad0f4608406;p=friendica.git Fixed: - Added missing `()` to `getRemoteUserId` which is a method, and not a property - `Undefined property: Friendica\Core\Session\Model\UserSession::$getRemoteUserId in /var/www/.../htdocs/mod/display.php on line 192` --- diff --git a/mod/display.php b/mod/display.php index d04b878c4b..4a48eb839c 100644 --- a/mod/display.php +++ b/mod/display.php @@ -69,10 +69,10 @@ function display_init(App $a) } // Is this item private but could be visible to the remove visitor? - if (!DBA::isResult($item) && DI::userSession()->getRemoteUserId) { + if (!DBA::isResult($item) && DI::userSession()->getRemoteUserId()) { $item = Post::selectFirst($fields, ['guid' => DI::args()->getArgv()[1], 'private' => Item::PRIVATE, 'origin' => true]); if (DBA::isResult($item)) { - if (!Contact::isFollower(DI::userSession()->getRemoteUserId, $item['uid'])) { + if (!Contact::isFollower(DI::userSession()->getRemoteUserId(), $item['uid'])) { $item = null; } else { $item_user = $item['uid']; @@ -189,9 +189,9 @@ function display_content(App $a, $update = false, $update_uid = 0) } } - if (($parent_uri_id == 0) && DI::userSession()->getRemoteUserId) { + if (($parent_uri_id == 0) && DI::userSession()->getRemoteUserId()) { $item = Post::selectFirst($fields, ['guid' => DI::args()->getArgv()[1], 'private' => Item::PRIVATE, 'origin' => true]); - if (DBA::isResult($item) && Contact::isFollower(DI::userSession()->getRemoteUserId, $item['uid'])) { + if (DBA::isResult($item) && Contact::isFollower(DI::userSession()->getRemoteUserId(), $item['uid'])) { $uri_id = $item['uri-id']; $parent_uri_id = $item['parent-uri-id']; } diff --git a/mod/redir.php b/mod/redir.php index cc4dc1c0c1..903c6b2a35 100644 --- a/mod/redir.php +++ b/mod/redir.php @@ -82,7 +82,7 @@ function redir_init(App $a) { } } - if (DI::userSession()->getRemoteUserId) { + if (DI::userSession()->getRemoteUserId()) { $host = substr(DI::baseUrl()->getUrlPath() . (DI::baseUrl()->getUrlPath() ? '/' . DI::baseUrl()->getUrlPath() : ''), strpos(DI::baseUrl()->getUrlPath(), '://') + 3); $remotehost = substr($contact['addr'], strpos($contact['addr'], '@') + 1);