Skip to content

Commit 2f539e4

Browse files
committed
fix: handle missing inbox
1 parent 346a3df commit 2f539e4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

utils/base.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,18 @@ public function getAllCommentsOfPage($page)
4848

4949
if (count($languageCodes) === 0) {
5050
$inbox = $this->getInboxByLanguage($page);
51-
$inboxes->add($inbox->toStructure());
51+
if (!is_null($inbox)) {
52+
$inboxes->add($inbox->toStructure());
53+
}
5254

5355
return $inboxes;
5456
}
5557

5658
foreach ($languageCodes as $language) {
5759
$inbox = $this->getInboxByLanguage($page, $language);
58-
$inboxes->add($inbox->toStructure());
60+
if (!is_null($inbox)) {
61+
$inboxes->add($inbox->toStructure());
62+
}
5963
}
6064

6165
return $inboxes;

0 commit comments

Comments
 (0)