I’m experiencing a strange issue which with “Mage::registry(’current_category’)”.
I have the following code in app/design/frontend/default/my_site/template/catalog/product/view.phtml:
$currentCategory = Mage::registry('current_category');
if( $_description = $currentCategory->getDescription() ): ?>
<h4><?php echo $this->__('Some Description Title') ?></h4>
<p class="category-description"><?php echo $_description ?></p>
<?php endif; ?>
This code works as expected in FireFox but throws a “Fatal error: Call to a member function getDescription() on a non-object” in IE (and Safari).
Does anybody have a clue why this might be?