Jump to content

Error Unexpected T_Paamayim_Nekudotayim Login User V 1.6.1.3


Recommended Posts

Hi!
I have a prestashop 1.6.1.3 but when i try login prestashop show a error: Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /furanet/sites/multiplicaliatest.com/web/htdocs/ecotienda/controllers/front/AuthController.php on line 364

 

Why?
 

I installed another clean prestashop 1.6.1.3, but I still have the same problem.

 

I cant upgrade php because my hosting is shared and I'm afraid to damage another website.

 

The line is:
/**
     * Process the newsletter settings and set the customer infos.
     *
     * @param Customer $customer Reference on the customer Object.
     *
     * @note At this point, the email has been validated.
     */
    protected function processCustomerNewsletter(&$customer)
    {
        $blocknewsletter = Module::isInstalled('blocknewsletter') && $module_newsletter = Module::getInstanceByName('blocknewsletter');
        if ($blocknewsletter && $module_newsletter->active && !Tools::getValue('newsletter')) {
            //if (is_callable(array($module_newsletter, 'isNewsletterRegistered')) && $module_newsletter->isNewsletterRegistered(Tools::getValue('email')) == $module_newsletter::GUEST_REGISTERED) {

                /* Force newsletter registration as customer as already registred as guest */
                //$_POST['newsletter'] = true;
            //}
        }

        if (Tools::getValue('newsletter')) {
            $customer->newsletter = true;
            $customer->ip_registration_newsletter = pSQL(Tools::getRemoteAddr());
            $customer->newsletter_date_add = pSQL(date('Y-m-d H:i:s'));
            /** @var Blocknewsletter $module_newsletter */
            if ($blocknewsletter && $module_newsletter->active) {
                $module_newsletter->confirmSubscription(Tools::getValue('email'));
            }
        }
    }

 

 

Thank you very much!
 

Link to comment
Share on other sites

Really, that you cannot upgrade your php engine is a bad news for you now and in the future.

 

You could for this error just prune as you did, but other portion of the core may blowup the same way.

The reason is that $module_newsletter is an instance variable and ::GUEST_REGISTERED a constant of this class.

The class constant access thru a variable exists since version 5.3.0 of PHP. Long long long time ago.

http://php.net/manual/en/language.oop5.constants.php

Remember PHP lower than 5.6 is nowdays no supported plateform anymore.

http://php.net/supported-versions.php

 

Upgrade your php is your only hope. Even if you do not upgrade PS to the latest, some native module may expect 5.3+ (expect 5.6+ soon)

Link to comment
Share on other sites

  • 6 months later...

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...