- Issue created by @urvashi_vora
- Merge request !12Issue #3350588: Fix the issues reported by PHPCS → (Closed) created by urvashi_vora
- Issue was unassigned.
- Status changed to Needs review
about 2 years ago 10:05am 27 March 2023 - Status changed to Needs work
about 2 years ago 1:18pm 27 March 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
- if (empty($_POST['g-recaptcha-response']) || empty($recaptcha_secret_key)) { + if (empty($this->requestStack->getCurrentRequest()->request->get('g-recaptcha-response')) || empty($recaptcha_secret_key)) {
Outside of a class method,
$this
is not available. - First commit to issue fork.
- Status changed to Needs review
about 2 years ago 6:35am 31 March 2023 - Status changed to Needs work
about 2 years ago 7:07am 31 March 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
$resp = $recaptcha->verify( - $_POST['g-recaptcha-response'], + $request->get('g-recaptcha-response'), \Drupal::request()->getClientIp()
Given that the very next line is using
\Drupal::request()
, I take there is not a$request
variable. - 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
All that is left for this is replacing the use of
$_POST
. - First commit to issue fork.
- last update
over 1 year ago 3 pass - Status changed to Needs review
over 1 year ago 6:42pm 10 December 2023 - 🇮🇳India ankithashetty Karnataka, India
MR updated with relevant changes. Ready for review now.
Just a thought on #8 comment: Noyiced the lines
$_POST['g-recaptcha-response']
and\Drupal::request()->getClientIp()
were added in different commits, may be that's why there is a difference? Am not 100% sure here, maintiner can confirm.Thanks!
- Status changed to Needs work
over 1 year ago 6:26pm 12 December 2023 - Status changed to Closed: duplicate
over 1 year ago 2:01pm 13 December 2023