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
b0f52806
Commit
b0f52806
authored
May 04, 2012
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #127 from aspendigital/feature-statement-fix
Fix Statement class passing bound objects to SQL logger
parents
c89b70f4
527bbfd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
Statement.php
lib/Doctrine/DBAL/Statement.php
+7
-1
No files found.
lib/Doctrine/DBAL/Statement.php
View file @
b0f52806
...
...
@@ -42,6 +42,10 @@ class Statement implements \IteratorAggregate, DriverStatement
* @var array The bound parameters.
*/
protected
$params
=
array
();
/**
* @var array The parameter types
*/
protected
$types
=
array
();
/**
* @var \Doctrine\DBAL\Driver\Statement The underlying driver statement.
*/
...
...
@@ -85,6 +89,7 @@ class Statement implements \IteratorAggregate, DriverStatement
public
function
bindValue
(
$name
,
$value
,
$type
=
null
)
{
$this
->
params
[
$name
]
=
$value
;
$this
->
types
[
$name
]
=
$type
;
if
(
$type
!==
null
)
{
if
(
is_string
(
$type
))
{
$type
=
Type
::
getType
(
$type
);
...
...
@@ -126,7 +131,7 @@ class Statement implements \IteratorAggregate, DriverStatement
{
$logger
=
$this
->
conn
->
getConfiguration
()
->
getSQLLogger
();
if
(
$logger
)
{
$logger
->
startQuery
(
$this
->
sql
,
$this
->
params
);
$logger
->
startQuery
(
$this
->
sql
,
$this
->
params
,
$this
->
types
);
}
$stmt
=
$this
->
stmt
->
execute
(
$params
);
...
...
@@ -135,6 +140,7 @@ class Statement implements \IteratorAggregate, DriverStatement
$logger
->
stopQuery
();
}
$this
->
params
=
array
();
$this
->
types
=
array
();
return
$stmt
;
}
...
...
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