Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
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
Tomáš Trávníček
doctrine-dbal
Commits
5bcd3563
Unverified
Commit
5bcd3563
authored
Jun 04, 2019
by
Jonathan H. Wage
Committed by
Sergei Morozov
Jan 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use bound instead of binded.
parent
6e63c7f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
MysqliStatement.php
lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
+13
-13
No files found.
lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
View file @
5bcd3563
...
@@ -54,10 +54,10 @@ final class MysqliStatement implements IteratorAggregate, Statement
...
@@ -54,10 +54,10 @@ final class MysqliStatement implements IteratorAggregate, Statement
private
$columnNames
;
private
$columnNames
;
/** @var mixed[] */
/** @var mixed[] */
private
$rowB
inde
dValues
=
[];
private
$rowB
oun
dValues
=
[];
/** @var mixed[] */
/** @var mixed[] */
private
$b
inde
dValues
=
[];
private
$b
oun
dValues
=
[];
/** @var string */
/** @var string */
private
$types
;
private
$types
;
...
@@ -99,8 +99,8 @@ final class MysqliStatement implements IteratorAggregate, Statement
...
@@ -99,8 +99,8 @@ final class MysqliStatement implements IteratorAggregate, Statement
return
;
return
;
}
}
$this
->
types
=
str_repeat
(
's'
,
$paramCount
);
$this
->
types
=
str_repeat
(
's'
,
$paramCount
);
$this
->
b
inde
dValues
=
array_fill
(
1
,
$paramCount
,
null
);
$this
->
b
oun
dValues
=
array_fill
(
1
,
$paramCount
,
null
);
}
}
/**
/**
...
@@ -114,8 +114,8 @@ final class MysqliStatement implements IteratorAggregate, Statement
...
@@ -114,8 +114,8 @@ final class MysqliStatement implements IteratorAggregate, Statement
throw
UnknownType
::
new
(
$type
);
throw
UnknownType
::
new
(
$type
);
}
}
$this
->
b
inde
dValues
[
$param
]
=&
$variable
;
$this
->
b
oun
dValues
[
$param
]
=&
$variable
;
$this
->
types
[
$param
-
1
]
=
self
::
$paramTypeMap
[
$type
];
$this
->
types
[
$param
-
1
]
=
self
::
$paramTypeMap
[
$type
];
}
}
/**
/**
...
@@ -129,9 +129,9 @@ final class MysqliStatement implements IteratorAggregate, Statement
...
@@ -129,9 +129,9 @@ final class MysqliStatement implements IteratorAggregate, Statement
throw
UnknownType
::
new
(
$type
);
throw
UnknownType
::
new
(
$type
);
}
}
$this
->
values
[
$param
]
=
$value
;
$this
->
values
[
$param
]
=
$value
;
$this
->
b
inde
dValues
[
$param
]
=&
$this
->
values
[
$param
];
$this
->
b
oun
dValues
[
$param
]
=&
$this
->
values
[
$param
];
$this
->
types
[
$param
-
1
]
=
self
::
$paramTypeMap
[
$type
];
$this
->
types
[
$param
-
1
]
=
self
::
$paramTypeMap
[
$type
];
}
}
/**
/**
...
@@ -187,10 +187,10 @@ final class MysqliStatement implements IteratorAggregate, Statement
...
@@ -187,10 +187,10 @@ final class MysqliStatement implements IteratorAggregate, Statement
// It's also important that row values are bound after _each_ call to store_result(). Otherwise,
// It's also important that row values are bound after _each_ call to store_result(). Otherwise,
// if mysqli is compiled with libmysql, subsequently fetched string values will get truncated
// if mysqli is compiled with libmysql, subsequently fetched string values will get truncated
// to the length of the ones fetched during the previous execution.
// to the length of the ones fetched during the previous execution.
$this
->
rowB
inde
dValues
=
array_fill
(
0
,
count
(
$this
->
columnNames
),
null
);
$this
->
rowB
oun
dValues
=
array_fill
(
0
,
count
(
$this
->
columnNames
),
null
);
$refs
=
[];
$refs
=
[];
foreach
(
$this
->
rowB
inde
dValues
as
$key
=>
&
$value
)
{
foreach
(
$this
->
rowB
oun
dValues
as
$key
=>
&
$value
)
{
$refs
[
$key
]
=&
$value
;
$refs
[
$key
]
=&
$value
;
}
}
...
@@ -212,7 +212,7 @@ final class MysqliStatement implements IteratorAggregate, Statement
...
@@ -212,7 +212,7 @@ final class MysqliStatement implements IteratorAggregate, Statement
$streams
=
$values
=
[];
$streams
=
$values
=
[];
$types
=
$this
->
types
;
$types
=
$this
->
types
;
foreach
(
$this
->
b
inde
dValues
as
$parameter
=>
$value
)
{
foreach
(
$this
->
b
oun
dValues
as
$parameter
=>
$value
)
{
if
(
!
isset
(
$types
[
$parameter
-
1
]))
{
if
(
!
isset
(
$types
[
$parameter
-
1
]))
{
$types
[
$parameter
-
1
]
=
self
::
$paramTypeMap
[
ParameterType
::
STRING
];
$types
[
$parameter
-
1
]
=
self
::
$paramTypeMap
[
ParameterType
::
STRING
];
}
}
...
@@ -290,7 +290,7 @@ final class MysqliStatement implements IteratorAggregate, Statement
...
@@ -290,7 +290,7 @@ final class MysqliStatement implements IteratorAggregate, Statement
if
(
$ret
===
true
)
{
if
(
$ret
===
true
)
{
$values
=
[];
$values
=
[];
foreach
(
$this
->
rowB
inde
dValues
as
$v
)
{
foreach
(
$this
->
rowB
oun
dValues
as
$v
)
{
$values
[]
=
$v
;
$values
[]
=
$v
;
}
}
...
...
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