Skip to content

Commit

Permalink
Remove inoperable error suppresion PDO library
Browse files Browse the repository at this point in the history
  • Loading branch information
condor2 authored Jan 9, 2024
1 parent 561cee4 commit 12e3059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upload/system/library/db/pdo.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function __construct(string $hostname, string $username, string $password
}

try {
$pdo = @new \PDO('mysql:host=' . $hostname . ';port=' . $port . ';dbname=' . $database . ';charset=utf8', $username, $password, [\PDO::ATTR_PERSISTENT => false, \PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8 COLLATE utf8_general_ci']);
$pdo = new \PDO('mysql:host=' . $hostname . ';port=' . $port . ';dbname=' . $database . ';charset=utf8', $username, $password, [\PDO::ATTR_PERSISTENT => false, \PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8 COLLATE utf8_general_ci']);
} catch (\PDOException $e) {
throw new \Exception('Error: Could not make a database link using ' . $username . '@' . $hostname . '!');
}
Expand Down

0 comments on commit 12e3059

Please sign in to comment.