aboutsummaryrefslogtreecommitdiff
path: root/app/Models/DatabaseDAO.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/DatabaseDAO.php')
-rw-r--r--app/Models/DatabaseDAO.php6
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;
}