]> git.mxchange.org Git - friendica.git/commitdiff
Possibly fixes notice "Undefined index: private in .../src/Model/Item.php on line...
authorMichael <heluecht@pirati.ca>
Mon, 14 Jun 2021 18:34:11 +0000 (18:34 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 14 Jun 2021 18:34:11 +0000 (18:34 +0000)
src/Model/Event.php

index c59baba9cb9d7a4329f9ba5c59c5c92138950d81..81e33013fb6d2b2606b656a7b9a191b407db330a 100644 (file)
@@ -586,10 +586,10 @@ class Event
                $last_date = '';
                $fmt = DI::l10n()->t('l, F j');
                foreach ($event_result as $event) {
-                       $item = Post::selectFirst(['plink', 'author-name', 'author-avatar', 'author-link'], ['id' => $event['itemid']]);
+                       $item = Post::selectFirst(['plink', 'author-name', 'author-avatar', 'author-link', 'private'], ['id' => $event['itemid']]);
                        if (!DBA::isResult($item)) {
                                // Using default values when no item had been found
-                               $item = ['plink' => '', 'author-name' => '', 'author-avatar' => '', 'author-link' => ''];
+                               $item = ['plink' => '', 'author-name' => '', 'author-avatar' => '', 'author-link' => '', 'private' => Item::PUBLIC];
                        }
 
                        $event = array_merge($event, $item);