From 962c4adf71b28550042f08c5283d4e7bc7f6cb73 Mon Sep 17 00:00:00 2001 From: durangod <50722740+durangod@users.noreply.github.com> Date: Sat, 27 Jun 2020 08:37:19 -0500 Subject: [PATCH] Update feed_item.php This initializes the var to avoid this notice - [Notice] Message: Undefined variable: shouldExtend File: /home/hypwatch/public_html/ow_plugins/newsfeed/components/feed_item.php Line:195 --- components/feed_item.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/feed_item.php b/components/feed_item.php index d75a03d..d9ad659 100644 --- a/components/feed_item.php +++ b/components/feed_item.php @@ -188,6 +188,9 @@ protected function getActionData( NEWSFEED_CLASS_Action $action ) "userIds" => $creatorIdList, 'createTime' => $action->getCreateTime() ); + + //init the var to avoid notice + if(!isset($shouldExtend)) { $shouldExtend = ''; } $shouldExtend = $this->displayType == NEWSFEED_CMP_Feed::DISPLAY_TYPE_ACTIVITY && $lastActivity !== null; @@ -746,4 +749,4 @@ public function renderMarkup( $cycle = null ) return $this->render(); } -} \ No newline at end of file +}