There are some times when we need to disable php errors like mysql gone away or some application errors to the end customers in your website. There are two ways by which you can tackle this issue. One is you can take care in the application and the second is in the php config file.
The easiest way is to make changes in the php.ini file. Just search for display_errors in your php.ini file and make it to off like shown below.
display_errors = Off