fix: assert PDO after init pour analyse statique
This commit is contained in:
1 parent
e2aaa5dcd4
commit
6bf96beaed
1 file changed
+1
@@ -10,6 +10,7 @@ final class Database
|
|||||||
{
|
{
|
||||||
if (self::$pdo === null) {
|
if (self::$pdo === null) {
|
||||||
self::init();
|
self::init();
|
||||||
|
assert(self::$pdo instanceof PDO);
|
||||||
self::$pdo->exec((string) file_get_contents(dirname(__DIR__) . '/database/schema.sql'));
|
self::$pdo->exec((string) file_get_contents(dirname(__DIR__) . '/database/schema.sql'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user