Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit 4f87556

Browse files
committed
deprecated array_get helper replaced with Arr::get
1 parent 58cb5ff commit 4f87556

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/ReCaptchaBuilder.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace Biscolab\ReCaptcha;
1212

1313
use Exception;
14+
use Illuminate\Support\Arr;
1415

1516
/**
1617
* Class ReCaptchaBuilder
@@ -225,9 +226,9 @@ function biscolabLaravelReCaptcha(token) {
225226
}
226227
elseif ($this->version == 'v3') {
227228

228-
$action = array_get($configuration, 'action', 'homepage');
229+
$action = Arr::get($configuration, 'action', 'homepage');
229230

230-
$js_custom_validation = array_get($configuration, 'custom_validation', '');
231+
$js_custom_validation = Arr::get($configuration, 'custom_validation', '');
231232

232233
// Check if set custom_validation. That function will override default fetch validation function
233234
if ($js_custom_validation) {
@@ -236,8 +237,8 @@ function biscolabLaravelReCaptcha(token) {
236237
}
237238
else {
238239

239-
$js_then_callback = array_get($configuration, 'callback_then', '');
240-
$js_callback_catch = array_get($configuration, 'callback_catch', '');
240+
$js_then_callback = Arr::get($configuration, 'callback_then', '');
241+
$js_callback_catch = Arr::get($configuration, 'callback_catch', '');
241242

242243
$js_then_callback = ($js_then_callback) ? "{$js_then_callback}(response)" : '';
243244
$js_callback_catch = ($js_callback_catch) ? "{$js_callback_catch}(err)" : '';

0 commit comments

Comments
 (0)