This repository was archived by the owner on Nov 28, 2019. It is now read-only.
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -158,14 +158,14 @@ public function Field($properties = array())
158
158
*/
159
159
public function validate ($ validator )
160
160
{
161
- /** @var array $request */
161
+ /** @var array $postVars */
162
162
if (SapphireTest::is_running_test ()) {
163
- $ request = $ _REQUEST ;
163
+ $ postVars = $ _REQUEST ;
164
164
} else {
165
- $ request = Controller::curr ()->getRequest ();
165
+ $ postVars = Controller::curr ()->getRequest ()-> postVars ();
166
166
}
167
167
// don't bother querying the recaptcha-service if fields were empty
168
- if (!array_key_exists ('g-recaptcha-response ' , $ request ) || empty ($ request ['g-recaptcha-response ' ])) {
168
+ if (!array_key_exists ('g-recaptcha-response ' , $ postVars ) || empty ($ postVars ['g-recaptcha-response ' ])) {
169
169
$ validator ->validationError (
170
170
$ this ->name ,
171
171
_t (
@@ -181,7 +181,7 @@ public function validate($validator)
181
181
return false ;
182
182
}
183
183
184
- $ response = $ this ->recaptchaHTTPPost ($ _REQUEST ['g-recaptcha-response ' ]);
184
+ $ response = $ this ->recaptchaHTTPPost ($ postVars ['g-recaptcha-response ' ]);
185
185
186
186
if (!$ response ) {
187
187
$ validator ->validationError (
You can’t perform that action at this time.
0 commit comments