Skip to content

Commit 48c6692

Browse files
committed
Throw an exception if contructor gets called on a disabled plugin
1 parent 9ac2cb9 commit 48c6692

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SQLiteDB.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ class SQLiteDB
4141
*/
4242
public function __construct($dbname, $schemadir, $sqlitehelper = null)
4343
{
44+
global $plugin_controller;
45+
if (!$plugin_controller->isEnabled('sqlite')) {
46+
throw new \Exception('SQLite plugin seems to be disabled.');
47+
}
4448
if (!class_exists('pdo') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
4549
throw new \Exception('SQLite PDO driver not available');
4650
}

0 commit comments

Comments
 (0)