From d7023d53367775bd171909912232d97aab445d9b Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 18 Sep 2018 00:33:49 +0200 Subject: [PATCH] app/library/OAuth/Adapter/League.php: handle exception in getProviderName() --- app/library/OAuth/Adapter/League.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/library/OAuth/Adapter/League.php b/app/library/OAuth/Adapter/League.php index cf27257..e9b8829 100644 --- a/app/library/OAuth/Adapter/League.php +++ b/app/library/OAuth/Adapter/League.php @@ -58,7 +58,12 @@ class League implements AdapterInterface */ public function getProviderName() { - return (new \ReflectionClass($this->_provider))->getShortName(); + try { + $reflection = new \ReflectionClass($this->_provider); + return $reflection->getShortName(); + } catch(\ReflectionException $ex) { + return ''; + } } /**