Skip to content

Commit b1a07db

Browse files
committed
Fix error pb with checkDatabase
1 parent 37ea46e commit b1a07db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Ubiquity/orm/reverse/DatabaseChecker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class DatabaseChecker {
2424

2525
private $databaseExist;
2626

27-
private Database $db;
27+
private ?Database $db;
2828

2929
private ?array $models = null;
3030

@@ -46,7 +46,7 @@ public function checkDatabase(): bool {
4646
try {
4747
$this->db = DAO::getDatabase($this->dbOffset);
4848
return $this->databaseExist = isset($this->db) && $this->db->isConnected();
49-
} catch (DAOException $e) {
49+
} catch (\Error $e) {
5050
return $this->databaseExist = false;
5151
}
5252
}

0 commit comments

Comments
 (0)