From 2b89b34c6d0696b866dfe4b51fd3c67190ad8c80 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Mon, 8 Mar 2021 18:36:02 +0100 Subject: Refactoring getCharSet and setCharSet Simplify the code in mysqli and postgres7 drivers, and get rid of unnecessary `@` error suppresion. --- drivers/adodb-postgres7.inc.php | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/adodb-postgres7.inc.php') diff --git a/drivers/adodb-postgres7.inc.php b/drivers/adodb-postgres7.inc.php index 38762bf3..d0fd78ad 100644 --- a/drivers/adodb-postgres7.inc.php +++ b/drivers/adodb-postgres7.inc.php @@ -283,12 +283,6 @@ class ADODB_postgres7 extends ADODB_postgres64 { if (!$this->_connectionID) { return false; } - $this->charSet = @pg_client_encoding($this->_connectionID); - if (!$this->charSet) { - return false; - } else { - return $this->charSet; - } $this->charSet = pg_client_encoding($this->_connectionID); return $this->charSet ?: false; } -- cgit v1.3