Skip to content

Commit

Permalink
Fixes for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mjducharme committed Aug 23, 2019
1 parent c4629b4 commit 4509aa5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Captcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ protected function retrieveSecret(string $secret)
{
if ($secret) return $secret;

if (config('captcha.secret')) return config('captcha.secret');
if (config('captcha.secret')) {
return config('captcha.secret');
} elseif (env('RECAPTCHA_SECRET')) {
return env('RECAPTCHA_SECRET');
}

throw new SecretNotFoundException;
}
Expand Down
2 changes: 2 additions & 0 deletions src/ServiceProvider/CaptchaServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public function loadSiteKey($siteKey = null)

if (config('captcha.site_key')) {
return config('captcha.site_key');
} elseif (env('RECAPTCHA_SITE_KEY')) {
return env('RECAPTCHA_SITE_KEY');
}

throw new SiteKeyNotFoundException;
Expand Down

0 comments on commit 4509aa5

Please sign in to comment.