Avoid PHP warnings with PDO drivers (bug #786)

This commit is contained in:
Jakub Vrana 2021-02-23 12:33:30 +01:00
parent 0e5f39042a
commit 205305d6b5
2 changed files with 2 additions and 1 deletions

View file

@ -18,7 +18,7 @@ if (extension_loaded('pdo')) {
} catch (Exception $ex) {
auth_error(h($ex->getMessage()));
}
$this->pdo->setAttribute(3, 1); // 3 - PDO::ATTR_ERRMODE, 1 - PDO::ERRMODE_WARNING
$this->pdo->setAttribute(3, 0); // 3 - PDO::ATTR_ERRMODE, 0 - PDO::ERRMODE_SILENT
$this->pdo->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS
$this->server_info = @$this->pdo->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION
}

View file

@ -1,5 +1,6 @@
Adminer 4.8.1-dev:
Fix more PHP 8 warnings (bug #781)
Avoid PHP warnings with PDO drivers (bug #786, regression from 4.7.8)
MySQL: Allow moving views to other DB and renaming DB with views (bug #783)
PostgreSQL < 10 PDO: Avoid displaying GENERATED ALWAYS BY IDENTITY everywhere (bug #785, regression from 4.7.9)
SQLite: Fix displayed types (bug #784, regression from 4.8.0)