diff options
author | Andrew Dolgov <[email protected]> | 2021-03-02 17:11:38 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-03-02 17:11:38 +0300 |
commit | 1ab6ca57afc4281b078eb5ddfed7c26e8a5c24c8 (patch) | |
tree | 2778078246aaf0d9f6c4c380a2343994d28e81b6 /classes/config.php | |
parent | d6629ed18863f797d34ebdc65815d7af21cb8332 (diff) |
initialize Db object early because otherwise ORM might be used unconfigured
Diffstat (limited to 'classes/config.php')
-rw-r--r-- | classes/config.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/classes/config.php b/classes/config.php index b373c9266..1d045def4 100644 --- a/classes/config.php +++ b/classes/config.php @@ -314,6 +314,12 @@ class Config { static function sanity_check() { + /* we don't actually need the DB object right now but some checks below might ORM which won't be initialized + because it is set up in the Db constructor, which is why it's a good idea to do that as early as possible + it is a bit of a hack, maybe ORM should be initialized somewhere else (functions.php?) */ + + $pdo = Db::pdo(); + $errors = array(); if (strpos(self::get(Config::PLUGINS), "auth_") === false) { |