Is there a way I can either validate the connection parameters before making a connection using them, or alternatively turn off the warnings, so I can handle the errors myself? (by the way, ERRMODE_SILENT did not work)
I want my application to handle the errors, instead of displaying them in the output. This is a part of the constructor:
try {
$this->pdo = new PDO("mysql:host=$db_host;port=$db_port;dbname=$db_name", $db_user, $db_pass);
$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
} catch (PDOException $e){
$this->connEstablished = false;
$this->error = $e->getMessage();
}