Merge pull request #417 from jonasdkhansen/develop

Changed mysql pdo port empty check, to fix problem with mysql cant co…
pull/397/merge
Samuel Denis-D'Ortun 2017-02-08 11:20:57 -05:00 committed by GitHub
commit 5e87972387
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) { function __construct($host = null, $user = null, $pass = null, $db = null, $port = null) {
if($host != null && $user != null && $pass !== null && $db != null) { if($host != null && $user != null && $pass !== null && $db != null) {
$this->db_host = $host; $this->db_host = $host;
$this->db_port = $port || 3306; $this->db_port = (!empty($port)) ? $port : 3306;
$this->db_name = $db; $this->db_name = $db;
$this->db_user = $user; $this->db_user = $user;
$this->db_pass = $pass; $this->db_pass = $pass;