From b20b6af0dc94c2e9ec7ad25f65ee1d88547d6c5c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 19 Apr 2013 07:58:27 +0400 Subject: [PATCH] only pass port to mysqli_connect when it is set --- classes/db/mysqli.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/db/mysqli.php b/classes/db/mysqli.php index e82f6630..550df6f1 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(); -- 2.39.5