From 775bd7f25c71ed88e9ae73ed52ba129fecc7abd0 Mon Sep 17 00:00:00 2001 From: Brian Faust Date: Sun, 4 Dec 2016 09:11:20 +0200 Subject: [PATCH] Add missing else statement for config spoof --- src/Helpers/ConfigRetriever.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Helpers/ConfigRetriever.php b/src/Helpers/ConfigRetriever.php index 17e063c..0cc1c82 100644 --- a/src/Helpers/ConfigRetriever.php +++ b/src/Helpers/ConfigRetriever.php @@ -156,9 +156,9 @@ private function getFromEnv($key) $item = $providerKey; SocialiteWasCalled::$spoofedConfig = true; + } else { + throw new MissingConfigException("Configuration for $providerKey is missing."); } - - throw new MissingConfigException("Configuration for $providerKey is missing."); } return $item; @@ -186,9 +186,10 @@ protected function getConfigFromServicesArray($providerName) ]; SocialiteWasCalled::$spoofedConfig = true; + } else { + throw new MissingConfigException("There is no services entry for $providerName"); } - throw new MissingConfigException("There is no services entry for $providerName"); } $this->servicesArray = $configArray;