Skip to content

Commit c3e1caa

Browse files
be a tad more defensive about return value from json_decode
1 parent 15e88fe commit c3e1caa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

integrations/prosopo-procaptcha/class-procaptcha.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ protected function is_human_made_request()
219219

220220
$body = wp_remote_retrieve_body($response);
221221
$body = json_decode($body, true);
222-
223-
$is_verified = $body['verified'] ?? false;
222+
$is_verified = is_array($body) && isset($body['verified']) && $body['verified'];
224223

225224
return true === $is_verified;
226225
}

0 commit comments

Comments
 (0)