Skip to content

Commit aad778e

Browse files
author
Till Brehm
committed
Fixed PHP warnings in mysql install lib
1 parent 212e4d0 commit aad778e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

install/lib/mysql.lib.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function setDBData($host, $user, $password, $port) {
107107

108108
public function setDBName($name) {
109109
$this->dbName = $name;
110-
$this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass);
110+
$this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, '', (int)$this->dbPort);
111111
if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) {
112112
$this->close();
113113
$this->_sqlerror('Datenbank nicht gefunden / Database not found');
@@ -204,7 +204,7 @@ private function _query($sQuery = '') {
204204
$try++;
205205
$ok = mysqli_ping($this->_iConnId);
206206
if(!$ok) {
207-
if(!mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, $this->dbName, '', (int)$this->dbPort)) {
207+
if(!mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, $this->dbName, (int)$this->dbPort)) {
208208
if($this->errorNumber == '111') {
209209
// server is not available
210210
if($try > 9) {

0 commit comments

Comments
 (0)