diff options
| author | 2025-06-06 09:56:27 +0200 | |
|---|---|---|
| committer | 2025-06-06 09:56:27 +0200 | |
| commit | f620f16e2b62cc12e8b2a155d8f764dd8bafefe8 (patch) | |
| tree | 0fdfb5bad689dc061ef1f74367e75ff46038044f /lib/Minz | |
| parent | 4de7d0b81310c788365fd3d2ab28dfbbccb5b171 (diff) | |
Install: add test PDO typing (#7651)
fix https://github.com/FreshRSS/FreshRSS/issues/7647
Diffstat (limited to 'lib/Minz')
| -rw-r--r-- | lib/Minz/ModelPdo.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php index 86f6df306..cb541a1e4 100644 --- a/lib/Minz/ModelPdo.php +++ b/lib/Minz/ModelPdo.php @@ -62,7 +62,11 @@ class Minz_ModelPdo { $this->pdo->setPrefix($db['prefix'] . $this->current_user . '_'); break; case 'sqlite': - $dsn = 'sqlite:' . DATA_PATH . '/users/' . $this->current_user . '/db.sqlite'; + if (in_array($this->current_user, [null, '', Minz_User::INTERNAL_USER], true)) { + $dsn = 'sqlite::memory:'; + } else { + $dsn = 'sqlite:' . DATA_PATH . '/users/' . $this->current_user . '/db.sqlite'; + } $this->pdo = new Minz_PdoSqlite($dsn . $dsnParams, null, null, $driver_options); $this->pdo->setPrefix(''); break; |
