Skip to content

Commit 678d636

Browse files
authored
Merge pull request #595 from avbdr/master
liberate username and password variables for dbobject use
2 parents f2b9185 + 4397e47 commit 678d636

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

MysqliDb.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @copyright Copyright (c) 2010-2016
1111
* @license http://opensource.org/licenses/gpl-3.0.html GNU Public License
1212
* @link http://github.com/joshcam/PHP-MySQLi-Database-Class
13-
* @version 2.7
13+
* @version 2.8-master
1414
*/
1515

1616
class MysqliDb
@@ -136,8 +136,8 @@ class MysqliDb
136136
* @var string
137137
*/
138138
protected $host;
139-
protected $username;
140-
protected $password;
139+
protected $_username;
140+
protected $_password;
141141
protected $db;
142142
protected $port;
143143
protected $charset;
@@ -244,8 +244,8 @@ public function __construct($host = null, $username = null, $password = null, $d
244244
$this->host = $host;
245245
}
246246

247-
$this->username = $username;
248-
$this->password = $password;
247+
$this->_username = $username;
248+
$this->_password = $password;
249249
$this->db = $db;
250250
$this->port = $port;
251251
$this->charset = $charset;
@@ -278,7 +278,7 @@ public function connect()
278278
throw new Exception('MySQL host is not set');
279279
}
280280

281-
$this->_mysqli = new mysqli($this->host, $this->username, $this->password, $this->db, $this->port);
281+
$this->_mysqli = new mysqli($this->host, $this->_username, $this->_password, $this->db, $this->port);
282282

283283
if ($this->_mysqli->connect_error) {
284284
throw new Exception('Connect Error ' . $this->_mysqli->connect_errno . ': ' . $this->_mysqli->connect_error, $this->_mysqli->connect_errno);

0 commit comments

Comments
 (0)