Jump to content

Clearing cache results in override error


max0509

Recommended Posts

Hi Prestashop users,
 
I'm working on a new theme for our shop but when I clear the cache it gives the following error:

Notice: Trying to get property of non-object in .../override/classes/controller/FrontController.php on line 7 
Fatal error: Call to a member function assign() on a non-object in .../override/classes/controller/FrontController.php on line 7

Disabling override in 'Debug mode' and renaming the FrontController solves the problem.

 

This is the content of the override file:

<?php 

class FrontController extends FrontControllerCore
{
    public function __construct()
    {
        $this->context->smarty->assign('isMobile', $this->context->getMobileDevice());
 
        parent::__construct();
    }
}

Thanks in advance.

 

--

PS 1.6.0.14

Edited by max0509 (see edit history)
Link to comment
Share on other sites

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