diff --git a/com_oauthserver/site/src/Repository/ScopeRepository.php b/com_oauthserver/site/src/Repository/ScopeRepository.php index 35fd56d..e92d369 100644 --- a/com_oauthserver/site/src/Repository/ScopeRepository.php +++ b/com_oauthserver/site/src/Repository/ScopeRepository.php @@ -61,6 +61,11 @@ class ScopeRepository implements ScopeRepositoryInterface, DispatcherAwareInterf { $client = $this->clientModel->getItemByIdentifier($clientEntity->getIdentifier()); + if ($client === false) + { + throw new \RuntimeException($this->clientModel->getError()); + } + $scopes = $this->setupScopes($client, array_values($scopes)); PluginHelper::importPlugin('oauthserver');