diff --git a/classes/db/mysqli.php b/classes/db/mysqli.php index e82f66300..550df6f15 100644 --- a/classes/db/mysqli.php +++ b/classes/db/mysqli.php @@ -3,7 +3,10 @@ class Db_Mysqli implements IDb { private $link; function connect($host, $user, $pass, $db, $port) { - $this->link = mysqli_connect($host, $user, $pass, $db, $port); + if ($port) + $this->link = mysqli_connect($host, $user, $pass, $db, $port); + else + $this->link = mysqli_connect($host, $user, $pass, $db); if ($this->link) { $this->init();