Skip to content
Snippets Groups Projects
Commit aad778ef authored by Till Brehm's avatar Till Brehm
Browse files

Fixed PHP warnings in mysql install lib

parent 212e4d0e
No related branches found
No related tags found
No related merge requests found
...@@ -107,7 +107,7 @@ class db ...@@ -107,7 +107,7 @@ class db
public function setDBName($name) { public function setDBName($name) {
$this->dbName = $name; $this->dbName = $name;
$this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, '', (int)$this->dbPort);
if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) { if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) {
$this->close(); $this->close();
$this->_sqlerror('Datenbank nicht gefunden / Database not found'); $this->_sqlerror('Datenbank nicht gefunden / Database not found');
...@@ -204,7 +204,7 @@ class db ...@@ -204,7 +204,7 @@ class db
$try++; $try++;
$ok = mysqli_ping($this->_iConnId); $ok = mysqli_ping($this->_iConnId);
if(!$ok) { if(!$ok) {
if(!mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, $this->dbName, '', (int)$this->dbPort)) { if(!mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, $this->dbName, (int)$this->dbPort)) {
if($this->errorNumber == '111') { if($this->errorNumber == '111') {
// server is not available // server is not available
if($try > 9) { if($try > 9) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment