Hi,
Can you please explain bit more , which kind of errors you wanted to hide.
The best way to comment out two line of dev environment in entry script (index.php)
// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
these statement are just for debugging purpose, if YII_ENV is dev then it will show all kind of errors and warning at browser window.
If you comment these two lines that mean the app is ready for production that mean YII_ENV is prod , so it will stop showing any error or warning except any php FATAL error.
Hi,
If you remove defined('YII_ENV') or define('YII_ENV', 'dev');
still user can see errors, those are obvious , like: 404, 403
and if there is any error that related to syntax or database exception then user can not see that instead of original error they can see only this 500 , internal server error
or if you don’t want to remove then you can replace dev to prod and then application is ready for end users.
I hope this will also help you in further development.