Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PHP-MySQLi-Database-Class
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
PHP-MySQLi-Database-Class
Commits
8b58668c
Commit
8b58668c
authored
Aug 10, 2017
by
Mike Schekotov
Committed by
Alexander Butenko
Aug 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Short array syntax declaration redone for PHP 5.3 compatibility. (#675)
parent
c6811cdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
MysqliDb.php
MysqliDb.php
+7
-7
No files found.
MysqliDb.php
View file @
8b58668c
...
...
@@ -32,7 +32,7 @@ class MysqliDb
* MySQLi instances
* @var mysqli[]
*/
protected
$_mysqli
=
[]
;
protected
$_mysqli
=
array
()
;
/**
* The SQL query to be prepared and executed
...
...
@@ -211,7 +211,7 @@ class MysqliDb
/**
* @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
*/
...
...
@@ -240,7 +240,7 @@ class MysqliDb
}
}
$this
->
addConnection
(
'default'
,
[
$this
->
addConnection
(
'default'
,
array
(
'host'
=>
$host
,
'username'
=>
$username
,
'password'
=>
$password
,
...
...
@@ -248,7 +248,7 @@ class MysqliDb
'port'
=>
$port
,
'socket'
=>
$socket
,
'charset'
=>
$charset
]
);
)
);
if
(
$isSubQuery
)
{
$this
->
isSubQuery
=
true
;
...
...
@@ -345,8 +345,8 @@ class MysqliDb
*/
public
function
addConnection
(
$name
,
array
$params
)
{
$this
->
connectionsSettings
[
$name
]
=
[]
;
foreach
(
[
'host'
,
'username'
,
'password'
,
'db'
,
'port'
,
'socket'
,
'charset'
]
as
$k
)
{
$this
->
connectionsSettings
[
$name
]
=
array
()
;
foreach
(
array
(
'host'
,
'username'
,
'password'
,
'db'
,
'port'
,
'socket'
,
'charset'
)
as
$k
)
{
$prm
=
isset
(
$params
[
$k
])
?
$params
[
$k
]
:
null
;
if
(
$k
==
'host'
)
{
...
...
@@ -2161,7 +2161,7 @@ class MysqliDb
public
function
copy
()
{
$copy
=
unserialize
(
serialize
(
$this
));
$copy
->
_mysqli
=
[]
;
$copy
->
_mysqli
=
array
()
;
return
$copy
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment