diff --git a/app/Controllers/Admin/ContributorController.php b/app/Controllers/Admin/ContributorController.php index 9df5bc9b..0604a868 100644 --- a/app/Controllers/Admin/ContributorController.php +++ b/app/Controllers/Admin/ContributorController.php @@ -37,14 +37,15 @@ class ContributorController extends BaseController $this->podcast = $podcast; - if ( - count($params) > 1 && - ($this->user = (new UserModel())->getPodcastContributor((int) $params[1], (int) $params[0])) === null - ) { - throw PageNotFoundException::forPageNotFound(); + if (count($params) <= 1) { + return $this->{$method}(); } - return $this->{$method}(); + if (($this->user = (new UserModel())->getPodcastContributor((int) $params[1], (int) $params[0])) !== null) { + return $this->{$method}(); + } + + throw PageNotFoundException::forPageNotFound(); } public function list(): string