When I go to view a product, I am seen with this error:
Fatal error: Call to a member function getId() on a non-object in /chroot/home/mpgautop/mpgautoparts.com/html/app/code/core/Mage/Catalog/Block/Category/View.php on line 43
Here are lines 42-47:
if ($headBlock = $this->getLayout()->getBlock('head')) {
$cat_id = $this->getCurrentCategory()->getId();
$category = Mage::getModel('catalog/category')->getCurrentCategory()->getId();
if ($title = $category->getMetaTitle()) {
$headBlock->setTitle($title);
}
Does someone know of a fix for this? As I keep getting errors for line 43 and 44.