From d348e4afca7bac43bd1d21c9c1ced0622429afbe Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Jun 2021 18:34:11 +0000 Subject: [PATCH] Possibly fixes notice "Undefined index: private in .../src/Model/Item.php on line 3115" --- src/Model/Event.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Event.php b/src/Model/Event.php index c59baba9c..81e33013f 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -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);