File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
ReCaptchaValidation/Model Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -60,14 +60,13 @@ public function isValid(
6060 }
6161 $ result = $ reCaptcha ->verify ($ reCaptchaResponse , $ validationConfig ->getRemoteIp ());
6262
63- if ($ result ->isSuccess ()) {
64- $ validationResult = $ this ->validationResultFactory ->create (['errors ' => []]);
65- } else {
63+ $ validationErrors = [];
64+ if (!$ result ->isSuccess ()) {
6665 foreach ($ result ->getErrorCodes () as $ errorCode ) {
6766 $ validationErrors [] = $ this ->errorMessages ->getErrorMessage ($ errorCode );
6867 }
69- $ validationResult = $ this ->validationResultFactory ->create (['errors ' => $ validationErrors ]);
7068 }
71- return $ validationResult ;
69+
70+ return $ this ->validationResultFactory ->create (['errors ' => $ validationErrors ]);
7271 }
7372}
You can’t perform that action at this time.
0 commit comments