Fixed bug with hiding empty categories when flat catalog option is enabled. Menu does not work if "Hide empty categories" and "Use Flat Catalog Category" are enabled.
The bug: when flat categories were enabled then categories were not showing in Magento frontend.
What are flat tables?
To lighten the load on MySQL and speed up your shop Magento offers flat tables.
Use Flat Catalog Category and Use Flat Catalog Product are two options you can enable or disable in the Magento backend under System>Configuration>Catalog>Frontend.