correct exceptions for Questgroupspictures and Questtexts
This commit is contained in:
parent
42a7e9303c
commit
4085457bb1
2 changed files with 7 additions and 2 deletions
|
|
@ -47,7 +47,12 @@
|
|||
$questgroup = $this->Questgroups->getQuestgroupByUrl($seminary['id'], $questgroupUrl);
|
||||
|
||||
// Get Picture
|
||||
$picture = $this->Media->getMediaById($questgroup['questgroupspicture_id']);
|
||||
$picture = null;
|
||||
try {
|
||||
$picture = $this->Media->getMediaById($questgroup['questgroupspicture_id']);
|
||||
}
|
||||
catch(\nre\exceptions\IdNotFoundException $e) {
|
||||
}
|
||||
|
||||
|
||||
// Pass data to view
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@
|
|||
$sidequestId
|
||||
);
|
||||
if(empty($data)) {
|
||||
throw new \nre\exceptions\IdNotFoundException();
|
||||
throw new \nre\exceptions\IdNotFoundException($sidequestId);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue