aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Messages.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Widget/Messages.php')
-rw-r--r--Zotlabs/Widget/Messages.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php
index e7341b556..86ce2fa29 100644
--- a/Zotlabs/Widget/Messages.php
+++ b/Zotlabs/Widget/Messages.php
@@ -17,8 +17,8 @@ class Messages {
$tpl = get_markup_template('messages_widget.tpl');
$o = replace_macros($tpl, [
- '$entries' => $page['entries'],
- '$offset' => $page['offset'],
+ '$entries' => $page['entries'] ?? [],
+ '$offset' => $page['offset'] ?? 0,
'$feature_star' => feature_enabled(local_channel(), 'star_posts'),
'$strings' => [
'messages_title' => t('Public and restricted messages'),
@@ -37,11 +37,11 @@ class Messages {
if (!local_channel())
return;
- if ($options['offset'] == -1) {
+ if (isset($options['offset']) && $options['offset'] == -1) {
return;
}
- if ($options['type'] == 'notification') {
+ if (isset($options['type']) && $options['type'] == 'notification') {
return self::get_notices_page($options);
}