Merge pull request #11059 from MrPetovan/bug/notices

Suppress notice messages related to the VCard::getHTML call in mod/display
This commit is contained in:
Michael Vogel 2021-12-02 21:48:20 +01:00 committed by GitHub
commit 5a5c62f0fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -40,7 +40,7 @@ use Friendica\Protocol\DFRN;
function display_init(App $a) function display_init(App $a)
{ {
if (ActivityPub::isRequest()) { if (ActivityPub::isRequest()) {
(new Objects(DI::l10n(), ['guid' => DI::args()->getArgv()[1] ?? null]))->rawContent(); (new Objects(DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), $_SERVER, ['guid' => DI::args()->getArgv()[1] ?? null]))->run();
} }
if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) { if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
@ -121,7 +121,7 @@ function display_fetchauthor($item)
$shared = Item::getShareArray($item); $shared = Item::getShareArray($item);
if (!empty($shared) && empty($shared['comment'])) { if (!empty($shared) && empty($shared['comment'])) {
$profiledata = [ $profiledata = [
'uid' => -1, 'uid' => 0,
'id' => -1, 'id' => -1,
'nickname' => '', 'nickname' => '',
'name' => '', 'name' => '',

View file

@ -75,7 +75,7 @@ class VCard
$pending = $pcontact['pending'] ?? false; $pending = $pcontact['pending'] ?? false;
} }
if (!$contact['self'] && Protocol::supportsFollow($contact['network'])) { if (empty($contact['self']) && Protocol::supportsFollow($contact['network'])) {
if (in_array($rel, [Contact::SHARING, Contact::FRIEND])) { if (in_array($rel, [Contact::SHARING, Contact::FRIEND])) {
$unfollow_link = 'unfollow?url=' . urlencode($contact['url']) . '&auto=1'; $unfollow_link = 'unfollow?url=' . urlencode($contact['url']) . '&auto=1';
} elseif (!$pending) { } elseif (!$pending) {