This modification makes changes to the database classes wrapping the connection part inside a try/catch like it should be to catch the errors.
Preventing your website from revealing the database connection details.
You get a error similar to this showing your login credentials if the website is unable to make a database connection e.g too many connection could easily cause this.
Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'admin'@'localhost' (using password: YES) in /public_html/system/database/mysqli.php on line 6
Fatal error: Uncaught exception 'ErrorException' with message 'Error: Could not make a database link' in /public_html/system/database/mysqli.php:9 Stack trace:#0 /public_html/vqmod/vqcache/vq2-system_library_db.php(13): DBMySQLi->__construct('localhost', 'admin', 'password', 'opencart_db') #1 /public_html/index.php(44): DB->__construct('mysqli', 'localhost', 'admin', 'password', 'opencart_db') #2 {main} thrown in /public_html/system/database/mysqli.php on line 9
https://github.com/opencart/opencart/issues/5027
http://stackoverflow.com/questions/28671185/opencart-disable-mysql-php-error-display
Be the first to ask a question about this product.