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
f285ea55
Commit
f285ea55
authored
Jun 30, 2016
by
Steve Müller
Committed by
Marco Pivetta
Jul 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keep references to bound parameter values in oci8 driver
Closes #2261 Closes #2262 Closes #2386
parent
9e1300bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
OCI8Statement.php
lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
+15
-0
No files found.
lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
View file @
f285ea55
...
@@ -71,6 +71,15 @@ class OCI8Statement implements \IteratorAggregate, Statement
...
@@ -71,6 +71,15 @@ class OCI8Statement implements \IteratorAggregate, Statement
*/
*/
protected
$_paramMap
=
array
();
protected
$_paramMap
=
array
();
/**
* Holds references to bound parameter values.
*
* This is a new requirement for PHP7's oci8 extension that prevents bound values from being garbage collected.
*
* @var array
*/
private
$boundValues
=
array
();
/**
/**
* Creates a new OCI8Statement that uses the given connection handle and SQL statement.
* Creates a new OCI8Statement that uses the given connection handle and SQL statement.
*
*
...
@@ -148,11 +157,17 @@ class OCI8Statement implements \IteratorAggregate, Statement
...
@@ -148,11 +157,17 @@ class OCI8Statement implements \IteratorAggregate, Statement
$lob
=
oci_new_descriptor
(
$this
->
_dbh
,
OCI_D_LOB
);
$lob
=
oci_new_descriptor
(
$this
->
_dbh
,
OCI_D_LOB
);
$lob
->
writeTemporary
(
$variable
,
OCI_TEMP_BLOB
);
$lob
->
writeTemporary
(
$variable
,
OCI_TEMP_BLOB
);
$this
->
boundValues
[
$column
]
=&
$lob
;
return
oci_bind_by_name
(
$this
->
_sth
,
$column
,
$lob
,
-
1
,
OCI_B_BLOB
);
return
oci_bind_by_name
(
$this
->
_sth
,
$column
,
$lob
,
-
1
,
OCI_B_BLOB
);
}
elseif
(
$length
!==
null
)
{
}
elseif
(
$length
!==
null
)
{
$this
->
boundValues
[
$column
]
=&
$variable
;
return
oci_bind_by_name
(
$this
->
_sth
,
$column
,
$variable
,
$length
);
return
oci_bind_by_name
(
$this
->
_sth
,
$column
,
$variable
,
$length
);
}
}
$this
->
boundValues
[
$column
]
=&
$variable
;
return
oci_bind_by_name
(
$this
->
_sth
,
$column
,
$variable
);
return
oci_bind_by_name
(
$this
->
_sth
,
$column
,
$variable
);
}
}
...
...
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