Magento 1.7.0.2. I don't use flat category/products structure.
Take a look at file app/code/core/Mage/Catalog/Block/Navigation.php.
function _renderCategoryMenuItemHtml:
// get all children
if (Mage::helper('catalog/category_flat')->isEnabled()) {
$children = (array)$category->getChildrenNodes();
$childrenCount = count($children);
} else {
// category is instance of Mage_Catalog_Model_Category
$children = $category->getChildren(); // return string
$childrenCount = $children->count();
}
function getChildren of Mage_Catalog_Model_Category object:
/**
* Retrieve children ids comma separated
*
* @return string
*/
public function getChildren()
{
return implode(',', $this->getResource()->getChildren($this, false));
}
The question is - how we can call $children->count() if $children is a string? Is this a bug?