I added a function to catalog/products/list.phtml to change styling for certain category. It works fine on category list but it doesn't on search page.
Error
Fatal error: Call to a member function getId() on a non-object in ../catalog/product/list.phtml
Added function in product image section
if(Mage::registry('current_category')->getId() == 94))
How can I use this function but make searching working, please?