Skip to content

recaptcha: wrong instanceof check in Request class (recaptcha hook is not working, ERROR in log) #260

@gitrequests

Description

@gitrequests

Error in core/components/formit/src/FormIt/Request.php line 85

if (!empty($this->reCaptcha) && $this->reCaptcha instanceof Recaptcha) {
                $this->reCaptcha->render($this->config);

If I understood correctly, $ this-> reCaptcha should be instanceof RecaptchaService (or FormItReCaptcha).
The render method is also in the RecaptchaService class.
Moreover, there is no Sterc\FormIt\Service\Recaptcha class. There is only a Sterc\FormIt\Hook\Recaptcha class.

From error log:
(ERROR @ /var/www/core/components/formit/src/FormIt/Request.php : 88) [FormIt] Could not load FormItReCaptcha service class.

Is the recaptcha hook working correctly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions