What you probably want to do is change the error reporting settings for the production version, probably turning off the display_errors setting so that error messages are only logged in the error log file. This setting is controllable globally via php.ini, by directory via .htaccess (Apache), or per script via [man]ini_set[/man].