Update Page\Forum
This commit is contained in:
parent
b5387b7668
commit
db5557eb11
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ class Forum extends Page
|
|||
$this->c->Lang->load('forum');
|
||||
$this->c->Lang->load('subforums');
|
||||
|
||||
$forum = $this->c->forums->loadTree((int) $args['id']);
|
||||
$forum = $this->c->forums->loadTree($args['id']);
|
||||
if (! $forum instanceof ForumModel) {
|
||||
return $this->c->Message->message('Bad request');
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class Forum extends Page
|
|||
return $this->c->Redirect->url($forum->redirect_url);
|
||||
}
|
||||
|
||||
$forum->page = isset($args['page']) ? (int) $args['page'] : 1;
|
||||
$forum->page = $args['page'] ?? 1;
|
||||
if (! $forum->hasPage()) {
|
||||
return $this->c->Message->message('Bad request');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue