diff options
| author | 2025-01-10 08:47:52 +0100 | |
|---|---|---|
| committer | 2025-01-10 08:47:52 +0100 | |
| commit | 7a79717e102447f72f592fd48aa5d793bcdbf1c6 (patch) | |
| tree | cf5811933b865be6fae36acfb5e225659cc3fce7 /app/Models/DatabaseDAO.php | |
| parent | 82b1d999dcfaccea7996d4dccd4778754ec39389 (diff) | |
Fix sqlite_version (#7205)
* Fix sqlite_version
for https://github.com/FreshRSS/FreshRSS/pull/7161
* Fix PostgreSQL
Diffstat (limited to 'app/Models/DatabaseDAO.php')
| -rw-r--r-- | app/Models/DatabaseDAO.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Models/DatabaseDAO.php b/app/Models/DatabaseDAO.php index 5a58ea2ad..5a25b74a0 100644 --- a/app/Models/DatabaseDAO.php +++ b/app/Models/DatabaseDAO.php @@ -197,13 +197,17 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo { self::$staticVersion = $version; } + protected function selectVersion(): string { + return $this->fetchValue('SELECT version()') ?? ''; + } + public function version(): string { if (self::$staticVersion !== null) { return self::$staticVersion; } static $version = null; if (!is_string($version)) { - $version = $this->fetchValue('SELECT version()') ?? ''; + $version = $this->selectVersion(); } return $version; } |
