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
95b40a13
Unverified
Commit
95b40a13
authored
Jul 25, 2020
by
Sergei Morozov
Committed by
GitHub
Jul 25, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4192 from morozov/pdo-sqlsrv-quote
Remove workaround in PDO\SQLSrv\Connection::quote()
parents
9eb02192
95191ee8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
Connection.php
src/Driver/PDO/SQLSrv/Connection.php
+1
-12
No files found.
src/Driver/PDO/SQLSrv/Connection.php
View file @
95b40a13
...
...
@@ -9,10 +9,6 @@ use Doctrine\DBAL\Driver\Statement as StatementInterface;
use
Doctrine\DBAL\ParameterType
;
use
PDO
;
use
function
is_string
;
use
function
strpos
;
use
function
substr
;
final
class
Connection
implements
ServerInfoAwareConnection
{
/** @var PDOConnection */
...
...
@@ -40,14 +36,7 @@ final class Connection implements ServerInfoAwareConnection
*/
public
function
quote
(
$value
,
$type
=
ParameterType
::
STRING
)
{
$val
=
$this
->
connection
->
quote
(
$value
,
$type
);
// Fix for a driver version terminating all values with null byte
if
(
is_string
(
$val
)
&&
strpos
(
$val
,
"
\0
"
)
!==
false
)
{
$val
=
substr
(
$val
,
0
,
-
1
);
}
return
$val
;
return
$this
->
connection
->
quote
(
$value
,
$type
);
}
public
function
exec
(
string
$sql
)
:
int
...
...
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