Changed mysql pdo port empty check, to fix problem with mysql cant connect, when using custom port

This commit is contained in:
Jonas Hansen 2017-02-08 15:59:23 +01:00
parent fb1772dd66
commit fed9cec88b
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ class Database {
function __construct($host = null, $user = null, $pass = null, $db = null, $port = null) {
if($host != null && $user != null && $pass !== null && $db != null) {
$this->db_host = $host;
$this->db_port = $port || 3306;
$this->db_port = (!empty($port)) ? $port : 3306;
$this->db_name = $db;
$this->db_user = $user;
$this->db_pass = $pass;