My shop is built with Prestashop 1.5.6.2.
On a error log file on my server, I can see the following error about 10 times a day : PHP Fatal error: Call to a member function getSubCategories() on null in ../controllers/front/ProductController.php on line 551
On the line 551 of the ProductController.php file is :
'subCategories' => $this->category->getSubCategories($this->context->language->id, true),
This line is part of the following code :
// various assignements before Hook::exec
$this->context->smarty->assign(array(
'path' => $path,
'category' => $this->category,
'subCategories' => $this->category->getSubCategories($this->context->language->id, true),
'id_category_current' => (int)$this->category->id,
'id_category_parent' => (int)$this->category->id_parent,
'return_category_name' => Tools::safeOutput($this->category->name),
'categories' => Category::getHomeCategories($this->context->language->id, true, (int)$this->context->shop->id)
));
I am not a developer and I do not know what could lead to this error.
Would you have any idea of what could make this error ?
Thank you in advance for your any reply.
Patrick