From f69f5616871ba69f2107ee33fc226c35fff8b34b Mon Sep 17 00:00:00 2001 From: Artem Vasilev Date: Thu, 14 Mar 2024 22:01:07 +0300 Subject: [PATCH] throw exception on client not found --- com_oauthserver/site/src/Repository/ScopeRepository.php | 5 +++++ 1 file changed, 5 insertions(+) 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');