Skip to content

Instantly share code, notes, and snippets.

@ichaykin
Created October 4, 2022 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ichaykin/b116fd9b39ca833a1d7e98e0442dac43 to your computer and use it in GitHub Desktop.
Save ichaykin/b116fd9b39ca833a1d7e98e0442dac43 to your computer and use it in GitHub Desktop.
diff --git a/app/Tygh/Backend/Database/Pdo.php b/app/Tygh/Backend/Database/Pdo.php
index 4570c966da..f08d83deef 100644
--- a/app/Tygh/Backend/Database/Pdo.php
+++ b/app/Tygh/Backend/Database/Pdo.php
@@ -47,7 +47,12 @@ class Pdo implements IBackend
@list($host) = explode(':', $host);
try {
- $this->conn = new \PDO("mysql:host=$host;dbname=$database", $user, $passwd);
+ $this->conn = new \PDO(
+ "mysql:host=$host;dbname=$database",
+ $user,
+ $passwd,
+ [\PDO::ATTR_ERRMODE => \PDO::ERRMODE_SILENT]
+ );
} catch (PDOException $e) {
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment