Jump to content

Clearing cache results in override error


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:


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

Thanks in advance.




Edited by max0509 (see edit history)

Share this post

Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More