correct permissions checking for previous Questgroups if there is none
This commit is contained in:
parent
ad47782fca
commit
9c91c0c211
1 changed files with 2 additions and 2 deletions
|
|
@ -77,7 +77,7 @@
|
||||||
{
|
{
|
||||||
// Previous Questgroup
|
// Previous Questgroup
|
||||||
$previousQuestgroup = $this->Questgroups->getPreviousQuestgroup($questgroup['id']);
|
$previousQuestgroup = $this->Questgroups->getPreviousQuestgroup($questgroup['id']);
|
||||||
if(!$this->Questgroups->hasCharacterSolvedQuestgroup($previousQuestgroup['id'], $character['id'])) {
|
if(!is_null($previousQuestgroup) && !$this->Questgroups->hasCharacterSolvedQuestgroup($previousQuestgroup['id'], $character['id'])) {
|
||||||
throw new \nre\exceptions\AccessDeniedException();
|
throw new \nre\exceptions\AccessDeniedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -216,7 +216,7 @@
|
||||||
{
|
{
|
||||||
// Previous Questgroup
|
// Previous Questgroup
|
||||||
$previousQuestgroup = $this->Questgroups->getPreviousQuestgroup($questgroup['id']);
|
$previousQuestgroup = $this->Questgroups->getPreviousQuestgroup($questgroup['id']);
|
||||||
if(!$this->Questgroups->hasCharacterSolvedQuestgroup($previousQuestgroup['id'], $character['id'])) {
|
if(!is_null($previousQuestgroup) && !$this->Questgroups->hasCharacterSolvedQuestgroup($previousQuestgroup['id'], $character['id'])) {
|
||||||
throw new \nre\exceptions\AccessDeniedException();
|
throw new \nre\exceptions\AccessDeniedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue