throw exception on client not found

This commit is contained in:
Artem Vasilev 2024-03-14 22:01:07 +03:00
parent 1bb5becef0
commit f69f561687

View File

@ -61,6 +61,11 @@ class ScopeRepository implements ScopeRepositoryInterface, DispatcherAwareInterf
{ {
$client = $this->clientModel->getItemByIdentifier($clientEntity->getIdentifier()); $client = $this->clientModel->getItemByIdentifier($clientEntity->getIdentifier());
if ($client === false)
{
throw new \RuntimeException($this->clientModel->getError());
}
$scopes = $this->setupScopes($client, array_values($scopes)); $scopes = $this->setupScopes($client, array_values($scopes));
PluginHelper::importPlugin('oauthserver'); PluginHelper::importPlugin('oauthserver');