Skip to content

Commit

Permalink
Throw an exception if a provider has no config.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Sturgeon committed Nov 29, 2011
1 parent cd7b029 commit b75cfcb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions classes/strategy.php
Expand Up @@ -28,6 +28,11 @@ public function __construct($provider)

$this->config = \Config::get("ninjauth.providers.{$provider}");

if ($this->config === null)
{
throw new Exception(sprintf('Provider "%s" has no config.', $provider));
}

if ( ! $this->name)
{
// Attempt to guess the name from the class name
Expand Down

0 comments on commit b75cfcb

Please sign in to comment.