Skip to content

Commit 8b91a0f

Browse files
committed
fix(bazar): show error if list is missing
1 parent edc218d commit 8b91a0f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/bazar/services/ListManager.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ public function getOne($id): ?array
6161
}
6262

6363
$page = $this->pageManager->getOne($id);
64+
if (empty($page)) {
65+
echo '<div class="alert alert-danger">List id not found: '.$id.'</div>';
66+
return null;
67+
}
6468
$data = $this->loadJson($page['body'], $id);
6569
$this->cachedLists[$id] = $data;
6670

0 commit comments

Comments
 (0)