From df261d968e38d0ebae3e2dd09d8a9138dc320cc1 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 10 Jun 2018 22:02:25 +0200 Subject: [PATCH] app/library/OAuth/Adapter/League.php: __construct() should trow the correct exception. --- app/library/OAuth/Adapter/League.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/library/OAuth/Adapter/League.php b/app/library/OAuth/Adapter/League.php index 878b6e6..3d04fdf 100644 --- a/app/library/OAuth/Adapter/League.php +++ b/app/library/OAuth/Adapter/League.php @@ -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;