From: Andrew Dolgov Date: Fri, 19 Apr 2013 03:58:27 +0000 (+0400) Subject: only pass port to mysqli_connect when it is set X-Git-Tag: 1.7.9~25^2~133 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b20b6af0dc94c2e9ec7ad25f65ee1d88547d6c5c;p=tt-rss.git only pass port to mysqli_connect when it is set --- 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();