Archived
1
0
Fork 0

app/library/OAuth/Adapter/League.php: make sure the exception class is found.

This commit is contained in:
Henrik Hautakoski 2018-04-26 11:18:59 +02:00
parent e7f1029d62
commit 72713308c4

View file

@ -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;