Skip to content

Commit 0ca58e5

Browse files
committed
Don't read file if key set directly
1 parent 44c61e5 commit 0ca58e5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

examples/recaptcha-v2-checkbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
$secret = '';
3232

3333
// Copy the config.php.dist file to config.php and update it with your keys to run the examples
34-
if (is_readable(__DIR__ . '/config.php')) {
34+
if ($siteKey == '' && is_readable(__DIR__ . '/config.php')) {
3535
$config = include __DIR__ . '/config.php';
3636
$siteKey = $config['v2-standard']['site'];
3737
$secret = $config['v2-standard']['secret'];

examples/recaptcha-v2-invisible.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
$secret = '';
3232

3333
// Copy the config.php.dist file to config.php and update it with your keys to run the examples
34-
if (is_readable(__DIR__ . '/config.php')) {
34+
if ($siteKey == '' && is_readable(__DIR__ . '/config.php')) {
3535
$config = include __DIR__ . '/config.php';
3636
$siteKey = $config['v2-invisible']['site'];
3737
$secret = $config['v2-invisible']['secret'];

examples/recaptcha-v3-request-scores.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
$secret = '';
3232

3333
// Copy the config.php.dist file to config.php and update it with your keys to run the examples
34-
if (is_readable(__DIR__ . '/config.php')) {
34+
if ($siteKey == '' && is_readable(__DIR__ . '/config.php')) {
3535
$config = include __DIR__ . '/config.php';
3636
$siteKey = $config['v3']['site'];
3737
$secret = $config['v3']['secret'];

examples/recaptcha-v3-verify.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
$secret = '';
3232

3333
// Copy the config.php.dist file to config.php and update it with your keys to run the examples
34-
if (is_readable(__DIR__ . '/config.php')) {
34+
if ($siteKey == '' && is_readable(__DIR__ . '/config.php')) {
3535
$config = include __DIR__ . '/config.php';
3636
$siteKey = $config['v3']['site'];
3737
$secret = $config['v3']['secret'];

0 commit comments

Comments
 (0)