From 8b64e92b9262d2a2eec6345685ce421050f95c66 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Sun, 3 Jan 2021 15:28:31 +0100 Subject: Bump doctrine/dbal from 2.12.0 to 3.0.0 Signed-off-by: Christoph Wurst --- lib/private/DB/AdapterPgSql.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/private/DB/AdapterPgSql.php') diff --git a/lib/private/DB/AdapterPgSql.php b/lib/private/DB/AdapterPgSql.php index 77f0b6b7722..0d8794d59ac 100644 --- a/lib/private/DB/AdapterPgSql.php +++ b/lib/private/DB/AdapterPgSql.php @@ -31,7 +31,10 @@ class AdapterPgSql extends Adapter { protected $compatModePre9_5 = null; public function lastInsertId($table) { - return $this->conn->fetchColumn('SELECT lastval()'); + $result = $this->conn->executeQuery('SELECT lastval()'); + $val = $result->fetchOne(); + $result->free(); + return (int)$val; } public const UNIX_TIMESTAMP_REPLACEMENT = 'cast(extract(epoch from current_timestamp) as integer)'; @@ -62,7 +65,9 @@ class AdapterPgSql extends Adapter { return $this->compatModePre9_5; } - $version = $this->conn->fetchColumn('SHOW SERVER_VERSION'); + $result = $this->conn->executeQuery('SHOW SERVER_VERSION'); + $version = $result->fetchOne(); + $result->free(); $this->compatModePre9_5 = version_compare($version, '9.5', '<'); return $this->compatModePre9_5; -- cgit v1.2.3