diff --git a/system/Database/Postgre/Connection.php b/system/Database/Postgre/Connection.php index d5074d0ce595..2ee84dd70134 100644 --- a/system/Database/Postgre/Connection.php +++ b/system/Database/Postgre/Connection.php @@ -128,10 +128,12 @@ public function getVersion(): string return $this->dataCache['version']; } - if (! $this->connID || ($pgVersion = pg_version($this->connID)) === false) { + if (! $this->connID) { $this->initialize(); } + $pgVersion = pg_version($this->connID); + return isset($pgVersion['server']) ? $this->dataCache['version'] = $pgVersion['server'] : false; }