1. Add lines to the very beginning of the databases.php file
2. Read How to find an error in your code And in general, stop asking "how to do this and that" when you already know how to do it. Instead, ask, "how do I find a bug in my code?" And see point 2 right away.
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);