mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
Lots of fixes following errors found from unit tests
This commit is contained in:
parent
983c1faf0a
commit
95068c5176
@ -197,7 +197,7 @@ class Server
|
||||
foreach ($scopes as $scope) {
|
||||
|
||||
$scopeDetails = $this->dbcall('getScope', $scope);
|
||||
|
||||
//die(var_dump($scopeDetails));
|
||||
if ($scopeDetails === false) {
|
||||
|
||||
throw new OAuthServerClientException(sprintf($this->errors['invalid_scope'], $scope), 4);
|
||||
@ -504,11 +504,15 @@ class Server
|
||||
throw new OAuthServerException('No registered database abstractor');
|
||||
}
|
||||
|
||||
if ( ! $this->db instanceof Database) {
|
||||
throw new OAuthServerException('Registered database abstractor is not an instance of Oauth2\Authentication\Database');
|
||||
}
|
||||
|
||||
$args = func_get_args();
|
||||
$method = $args[0];
|
||||
unset ($args[0]);
|
||||
$params = $args;
|
||||
unset($args[0]);
|
||||
$params = array_values($args);
|
||||
|
||||
return call_user_func(array($this, $method), $args);
|
||||
return call_user_func_array(array($this->db, $method), $args);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user