Merge pull request #10405 from annando/notice
Possibly fixes notice "Undefined index: private in .../src/Model/Item.php on line 3115"
This commit is contained in:
commit
6a517b4130
1 changed files with 2 additions and 2 deletions
|
@ -586,10 +586,10 @@ class Event
|
||||||
$last_date = '';
|
$last_date = '';
|
||||||
$fmt = DI::l10n()->t('l, F j');
|
$fmt = DI::l10n()->t('l, F j');
|
||||||
foreach ($event_result as $event) {
|
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)) {
|
if (!DBA::isResult($item)) {
|
||||||
// Using default values when no item had been found
|
// 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);
|
$event = array_merge($event, $item);
|
||||||
|
|
Loading…
Reference in a new issue