diff --git a/utils/base.php b/utils/base.php index 971ab8c..e6d9ac5 100644 --- a/utils/base.php +++ b/utils/base.php @@ -48,14 +48,18 @@ public function getAllCommentsOfPage($page) if (count($languageCodes) === 0) { $inbox = $this->getInboxByLanguage($page); - $inboxes->add($inbox->toStructure()); + if (!is_null($inbox)) { + $inboxes->add($inbox->toStructure()); + } return $inboxes; } foreach ($languageCodes as $language) { $inbox = $this->getInboxByLanguage($page, $language); - $inboxes->add($inbox->toStructure()); + if (!is_null($inbox)) { + $inboxes->add($inbox->toStructure()); + } } return $inboxes;