Bugs slipping into code is inevitable, no matter how carefully we code and test. I have created many bugs in my day, and still make the odd mistake to this day. It is how you respond to your bugs that matter.
If you know there is a bug in your code, own up & fix it. If there is a chance that it has gotten out to live sites then patch & release a fix. If something on the customer side got affected by the bug then make the customer aware and sort it out. Not disclosing creates an atmosphere of mistrust, as the customer is bound to find out eventually.
If you work as part of a team, there is no debate here. Make sure your team knows what is going on. They cannot have your back if they are in the dark.