Archived
1
0
Fork 0

app/library/OAuth/Adapter/League.php: handle exception in getProviderName()

This commit is contained in:
Henrik Hautakoski 2018-09-18 00:33:49 +02:00
parent d241f35a19
commit d7023d5336
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA

View file

@ -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 '';
}
}
/**