php8 compat: undefined display_dat array keys

This commit is contained in:
onli 2021-03-16 19:49:02 +01:00
parent 6909411452
commit 11526604e1
2 changed files with 3 additions and 3 deletions

View File

@ -160,7 +160,7 @@ function serendipity_printEntries_rss(&$entries, $version, $comments = false, $f
}
serendipity_plugin_api::hook_event($entry_hook, $entry);
$entry['per_entry_display_dat'] = $entry['display_dat'];
$entry['per_entry_display_dat'] = $entry['display_dat'] ?? null;
}
}

View File

@ -298,8 +298,8 @@ switch($version) {
}
serendipity_plugin_api::hook_event($namespace_hook, $entries);
$namespace_display_dat = $entries['display_dat'];
$channel_display_dat = $entries['channel_dat'];
$namespace_display_dat = $entries['display_dat'] ?? null;
$channel_display_dat = $entries['channel_dat'] ?? null;
unset($entries['display_dat']);
unset($entries['channel_dat']);
$serendipity['smarty']->assignByRef('metadata', $metadata);