Skip to content

Commit 8064aab

Browse files
committed
Fix PostgreSQL getVersion() logic
1 parent 42b174f commit 8064aab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

system/Database/Postgre/Connection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,12 @@ public function getVersion(): string
128128
return $this->dataCache['version'];
129129
}
130130

131-
if (! $this->connID || ($pgVersion = pg_version($this->connID)) === false) {
131+
if (! $this->connID) {
132132
$this->initialize();
133133
}
134134

135+
$pgVersion = pg_version($this->connID);
136+
135137
return isset($pgVersion['server']) ? $this->dataCache['version'] = $pgVersion['server'] : false;
136138
}
137139

0 commit comments

Comments
 (0)