update: treat non existing permissions as denied

Otherwise, it causes 500 errors.
This commit is contained in:
Roardom
2024-02-02 01:05:39 +00:00
parent 9ec9536b85
commit 6024d7029a
6 changed files with 9 additions and 9 deletions
@@ -34,7 +34,7 @@ class ForumCategoryController extends Controller
}
// Check if the user has permission to view the forum
if (!$forum->getPermission()->show_forum) {
if (!$forum->getPermission()?->show_forum) {
return to_route('forums.index')
->withErrors('You Do Not Have Access To This Category!');
}