Skip to content

Commit 5f06e8b

Browse files
committed
Also listen for SQLiteDatabaseDoesNotExistException when checking isInstalled
1 parent dc8b380 commit 5f06e8b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Cms.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use CraftCms\Cms\Support\Facades\Sites;
1414
use CraftCms\Cms\Support\Facades\Updates;
1515
use CraftCms\Cms\Support\Facades\Users;
16+
use Illuminate\Database\SQLiteDatabaseDoesNotExistException;
1617
use Illuminate\Http\Request;
1718
use Illuminate\Support\Facades\Auth;
1819
use Illuminate\Support\Facades\Context;
@@ -149,7 +150,7 @@ public static function isInstalled(bool $strict = false): bool
149150

150151
try {
151152
DB::connection()->getPdo();
152-
} catch (PDOException $e) {
153+
} catch (PDOException|SQLiteDatabaseDoesNotExistException $e) {
153154
if (! app()->runningInConsole()) {
154155
Log::error('There was a problem connecting to the database: '.$e->getMessage(), [__METHOD__]);
155156
report($e);

0 commit comments

Comments
 (0)