Browse Source

Fix PostgreSQL connection error message

microsub
J. King 4 years ago
parent
commit
15de8c2320
  1. 2
      lib/Db/PostgreSQL/Driver.php

2
lib/Db/PostgreSQL/Driver.php

@ -185,7 +185,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver {
$dsn = $this->makeconnectionString(false, $user, $pass, $db, $host, $port, $service);
set_error_handler(function(int $code, string $msg) {
$msg = substr($msg, 62);
throw new Exception("connectionFailure", ["PostgreSQL", $msg]);
throw new Exception("connectionFailure", ['engine' => "PostgreSQL", 'message' => $msg]);
});
try {
$this->db = pg_connect($dsn, \PGSQL_CONNECT_FORCE_NEW);

Loading…
Cancel
Save