only pass port to mysqli_connect when it is set
This commit is contained in:
parent
1f29443530
commit
b20b6af0dc
|
@ -3,7 +3,10 @@ class Db_Mysqli implements IDb {
|
||||||
private $link;
|
private $link;
|
||||||
|
|
||||||
function connect($host, $user, $pass, $db, $port) {
|
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) {
|
if ($this->link) {
|
||||||
$this->init();
|
$this->init();
|
||||||
|
|
Loading…
Reference in New Issue