Skip to content

Commit 8b58668

Browse files
Mike Schekotovavbdr
authored andcommitted
Short array syntax declaration redone for PHP 5.3 compatibility. (ThingEngineer#675)
1 parent c6811cd commit 8b58668

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

MysqliDb.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MysqliDb
3232
* MySQLi instances
3333
* @var mysqli[]
3434
*/
35-
protected $_mysqli = [];
35+
protected $_mysqli = array();
3636

3737
/**
3838
* The SQL query to be prepared and executed
@@ -211,7 +211,7 @@ class MysqliDb
211211
/**
212212
* @var array connections settings [profile_name=>[same_as_contruct_args]]
213213
*/
214-
protected $connectionsSettings = [];
214+
protected $connectionsSettings = array();
215215
/**
216216
* @var string the name of a default (main) mysqli connection
217217
*/
@@ -240,15 +240,15 @@ public function __construct($host = null, $username = null, $password = null, $d
240240
}
241241
}
242242

243-
$this->addConnection('default', [
243+
$this->addConnection('default', array(
244244
'host' => $host,
245245
'username' => $username,
246246
'password' => $password,
247247
'db' => $db,
248248
'port' => $port,
249249
'socket' => $socket,
250250
'charset' => $charset
251-
]);
251+
));
252252

253253
if ($isSubQuery) {
254254
$this->isSubQuery = true;
@@ -345,8 +345,8 @@ public function disconnect($connection = 'default')
345345
*/
346346
public function addConnection($name, array $params)
347347
{
348-
$this->connectionsSettings[$name] = [];
349-
foreach (['host', 'username', 'password', 'db', 'port', 'socket', 'charset'] as $k) {
348+
$this->connectionsSettings[$name] = array();
349+
foreach (array('host', 'username', 'password', 'db', 'port', 'socket', 'charset') as $k) {
350350
$prm = isset($params[$k]) ? $params[$k] : null;
351351

352352
if ($k == 'host') {
@@ -2161,7 +2161,7 @@ public static function subQuery($subQueryAlias = "")
21612161
public function copy()
21622162
{
21632163
$copy = unserialize(serialize($this));
2164-
$copy->_mysqli = [];
2164+
$copy->_mysqli = array();
21652165
return $copy;
21662166
}
21672167

0 commit comments

Comments
 (0)