MyBB Community Forums

Full Version: Base database class
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When using the various database classes, there are several classes (DB_MySQL, DB_MySQLi etc) all with the same methods. These classes should all extend a base class (e.g.: DB_Base) so that a database instance can be more easily type hinted both in PHPDoc and actual code (PHP 5.3+) both in the core and in plugins. This change would not break backwards compatibility and would more be a cosmetic change for developers.
Created a pull request and fixed a potential error in db_pdo.php: https://github.com/mybb/mybb/pull/1602
I agree with this suggestion.