]> git.joonet.de Git - adminer.git/commitdiff
Avoid PHP warnings with PDO drivers (bug #786)
authorJakub Vrana <jakub@vrana.cz>
Tue, 23 Feb 2021 11:33:30 +0000 (12:33 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 23 Feb 2021 11:33:30 +0000 (12:33 +0100)
adminer/include/pdo.inc.php
changes.txt

index b0f8b62bafb4ac0a9bbc8e3f9fcf6a66bff6ee14..d7da9caa596ca4a9f973e5e3bdfcc2eb05c61082 100644 (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
                }
index 98eee223af9bd6c4eb140056ae252f011ec1d901..34ad861be7d6e04218b88b83a5c09644337a04e6 100644 (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)