In a development environment it's best to work with error_reporting(E_ALL)
, so you can see notices as well. This encourages you to have a higher coding standard.
When running a live site, you MUST have display_errors off
, but log your errors (just like you're doing).
This way, you will only see errors that have meaning, and not only "Notice: Undefined ...". If the website is already done, you should spend a bit of time refactoring your code, the long-term benefits will be worth it.