Items with zero quantity still display in the catalog. The Inventory section of Catalog Configuration setting: Display Out of Stock Products is set to no. The web site product page says "In Stock" but adding to Cart gets the Out of Stock message. My database was entered using the Import option and a CSV file.
1. First off, make sure that the products you don't want to be displayed have the "Out of stock" status. 2. Besides, this could be an indexing issue. Go toSystem > Index Management and index anew "Stock Status" (it would be even better to update all indices).
If this doesn't help, another possible reason is that your custom settings do not filter products correctly by "Out Of Stock".
To test if this is the case, switch to a default theme and try to reproduce this error.
If this still doesn't help, disable local modules in app/etc/local.xml by changing <disable_local_modules>false</disable_local_modules>