Commit 8b58668c authored by Mike Schekotov's avatar Mike Schekotov Committed by Alexander Butenko

Short array syntax declaration redone for PHP 5.3 compatibility. (#675)

parent c6811cdb
...@@ -32,7 +32,7 @@ class MysqliDb ...@@ -32,7 +32,7 @@ class MysqliDb
* MySQLi instances * MySQLi instances
* @var mysqli[] * @var mysqli[]
*/ */
protected $_mysqli = []; protected $_mysqli = array();
/** /**
* The SQL query to be prepared and executed * The SQL query to be prepared and executed
...@@ -211,7 +211,7 @@ class MysqliDb ...@@ -211,7 +211,7 @@ class MysqliDb
/** /**
* @var array connections settings [profile_name=>[same_as_contruct_args]] * @var array connections settings [profile_name=>[same_as_contruct_args]]
*/ */
protected $connectionsSettings = []; protected $connectionsSettings = array();
/** /**
* @var string the name of a default (main) mysqli connection * @var string the name of a default (main) mysqli connection
*/ */
...@@ -240,7 +240,7 @@ class MysqliDb ...@@ -240,7 +240,7 @@ class MysqliDb
} }
} }
$this->addConnection('default', [ $this->addConnection('default', array(
'host' => $host, 'host' => $host,
'username' => $username, 'username' => $username,
'password' => $password, 'password' => $password,
...@@ -248,7 +248,7 @@ class MysqliDb ...@@ -248,7 +248,7 @@ class MysqliDb
'port' => $port, 'port' => $port,
'socket' => $socket, 'socket' => $socket,
'charset' => $charset 'charset' => $charset
]); ));
if ($isSubQuery) { if ($isSubQuery) {
$this->isSubQuery = true; $this->isSubQuery = true;
...@@ -345,8 +345,8 @@ class MysqliDb ...@@ -345,8 +345,8 @@ class MysqliDb
*/ */
public function addConnection($name, array $params) public function addConnection($name, array $params)
{ {
$this->connectionsSettings[$name] = []; $this->connectionsSettings[$name] = array();
foreach (['host', 'username', 'password', 'db', 'port', 'socket', 'charset'] as $k) { foreach (array('host', 'username', 'password', 'db', 'port', 'socket', 'charset') as $k) {
$prm = isset($params[$k]) ? $params[$k] : null; $prm = isset($params[$k]) ? $params[$k] : null;
if ($k == 'host') { if ($k == 'host') {
...@@ -2161,7 +2161,7 @@ class MysqliDb ...@@ -2161,7 +2161,7 @@ class MysqliDb
public function copy() public function copy()
{ {
$copy = unserialize(serialize($this)); $copy = unserialize(serialize($this));
$copy->_mysqli = []; $copy->_mysqli = array();
return $copy; return $copy;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment