From c0350861ef0da66209e6b08c75af2c16e3673e25 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 13 Feb 2022 19:31:51 +0000 Subject: php8 warnings --- Zotlabs/Widget/Messages.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Widget') 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); } -- cgit v1.2.3