app/library/OAuth/Adapter/League.php: __construct() should trow the correct exception.
This commit is contained in:
parent
ba90c7190d
commit
df261d968e
1 changed files with 2 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ class League implements AdapterInterface
|
|||
public function __construct($provider_name, $options)
|
||||
{
|
||||
if (!array_key_exists($provider_name, $this->_providerClasses)) {
|
||||
throw new \Exception("Provider '{$provider_name}' is not supported.");
|
||||
throw new Exception("Provider '{$provider_name}' is not supported.");
|
||||
}
|
||||
|
||||
$className = $this->_providerClasses[$provider_name];
|
||||
|
|
@ -45,7 +45,7 @@ class League implements AdapterInterface
|
|||
|
||||
if (!($provider instanceof AbstractProvider)) {
|
||||
// TODO: Throw a better exception class :)
|
||||
throw new \Exception("Provider object must be an instance of League\\OAuth2\\Client\\Provider\\AbstractProvider");
|
||||
throw new Exception("Provider object must be an instance of League\\OAuth2\\Client\\Provider\\AbstractProvider");
|
||||
}
|
||||
|
||||
$this->_provider = $provider;
|
||||
|
|
|
|||
Reference in a new issue