Jump to content
thirty bees forum
  • 0

Problem with installing override module


Yabber

Question

When installing a module that overwrites blocknewsletter module, I get this error:

The following module(s) could not be installed properly:
    googlecaptcha :
        Unable to install override: Failed to evaluate override file /home/iwona/public_html/tbshop/modules/googlecaptcha/override/modules/blocknewsletter/blocknewsletter.php: syntax error, unexpected token "extends", expecting "{" at line 2

Code of the file blocknewsletter.php

<?php

class BlocknewsletterOverride extends Blocknewsletter
{
    public function confirmSubscription($email)
    {
        if (Module::isEnabled('googlecaptcha') && ($module = Module::getInstanceByName('googlecaptcha')) && $module->hookValidate('newsletter')) {
            $module->captchaValidate(Context::getContext()->controller->errors);
        }
        if (Context::getContext()->controller->errors) {
            return false;
        }
        return parent::confirmSubscription($email);
    }
}


Thirty bees version: 1.6.0
Thirty bees revision: db85aa271005ab890a8c3a9711a3cca9722d5095
Build for PHP version: 8.3

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...