|
I totally forgot that I was running with display_errors = off when I debugged this, hence no useful “input”. But anyway, tracked it down so far:
public function getCurrentCategory() { $category = $this->getData('current_category'); if (is_null($category)) { if ($category = Mage::registry('current_category')) { $this->setData('current_category', $category); } else { $category = false; $this->setData('current_category', $category); } } return $category; }
This function returns “false” (for whatever reason) and this effectively breaks (= fatals) the rest of the page:
Fatal error: Call to a member function getChildren() on a non-object in /path/magento/1.0/app/code/core/Mage/Catalog/Block/Navigation.php on line 77
There is also a docbug in Mage_Catalog_Model_Layer::getCurrentCategory(). It states that the function returns “Mage_Catalog_Model_Category”, when it can also return a boolean. This should be corrected as well. Also, I’d appreciate inline comments why it can be false after all.
@Madman2: Thanks for posting this snippet!
Cheers,
Till
|