From e211ef027100cad9f3bc1caa080b03e8adf7b0b1 Mon Sep 17 00:00:00 2001 From: Roland Dalmulder Date: Fri, 12 May 2023 15:14:16 +0200 Subject: [PATCH] Check if there is a title or body set Signed-off-by: Roland Dalmulder --- .../com_patchtester/PatchTester/Model/PullsModel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_patchtester/PatchTester/Model/PullsModel.php b/administrator/components/com_patchtester/PatchTester/Model/PullsModel.php index 865b10e..7606416 100644 --- a/administrator/components/com_patchtester/PatchTester/Model/PullsModel.php +++ b/administrator/components/com_patchtester/PatchTester/Model/PullsModel.php @@ -362,8 +362,8 @@ class PullsModel extends ListModel // Build the data object to store in the database $pullData = [ (int) $pull->number, - $this->getDbo()->quote(HTMLHelper::_('string.truncate', $pull->title, 150)), - $this->getDbo()->quote(HTMLHelper::_('string.truncate', $pull->body, 100)), + $this->getDbo()->quote(HTMLHelper::_('string.truncate', ($pull->title ?? ''), 150)), + $this->getDbo()->quote(HTMLHelper::_('string.truncate', ($pull->body ?? ''), 100)), $this->getDbo()->quote($pull->html_url), (int) $isRTC, (int) $isNPM,