diff --git a/app/Modules/Users/Http/Controllers/Site/UsersController.php b/app/Modules/Users/Http/Controllers/Site/UsersController.php index 5242b5ce1..67327c4aa 100644 --- a/app/Modules/Users/Http/Controllers/Site/UsersController.php +++ b/app/Modules/Users/Http/Controllers/Site/UsersController.php @@ -73,7 +73,8 @@ public function account(Request $request) // `segment()` is NOT zero-indexed. "account" will be segment 1 $pos = array_search('account', $request->segments()); - $i = $pos ? $pos + 2 : 0; + $i = is_int($pos) ? $pos : 0; + $i = $i + 2; event($event = new UserDisplay($user, $request->segment($i))); $sections = collect($event->getSections());