Skip to content

Commit

Permalink
hide password when throwing exception #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Tino Ehrich committed Oct 3, 2016
1 parent 2450989 commit f31893c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ public function __construct($host, $user, $password, $database, $fetchMode = \PD
}
catch (\PDOException $e)
{
throw new MysqlException($e->getMessage(), $e->getCode());
$message = str_replace($password, '********', $e->getMessage());
throw new MysqlException($message, $e->getCode());
}
}

Expand Down

0 comments on commit f31893c

Please sign in to comment.