diff --git a/system/Commands/Database/CreateDatabase.php b/system/Commands/Database/CreateDatabase.php index 0c8d2016dc93..8a9efb98de35 100644 --- a/system/Commands/Database/CreateDatabase.php +++ b/system/Commands/Database/CreateDatabase.php @@ -95,6 +95,14 @@ public function run(array $params) // Special SQLite3 handling if ($db instanceof Connection) { + + if (!extension_loaded('sqlite3')) { + CLI::error("extension [sqlite3] not loaded. Uncomment it in the php.ini file", 'light_gray', 'red'); + CLI::newLine(); + + return; + } + $ext = $params['ext'] ?? CLI::getOption('ext') ?? 'db'; if (! in_array($ext, ['db', 'sqlite'], true)) {