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
95191ee8
Unverified
Commit
95191ee8
authored
Jul 25, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove workaround in PDO\SQLSrv\Connection::quote()
parent
824d2eb0
Changes
1
Hide 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 @
95191ee8
...
@@ -9,10 +9,6 @@ use Doctrine\DBAL\Driver\Statement as StatementInterface;
...
@@ -9,10 +9,6 @@ use Doctrine\DBAL\Driver\Statement as StatementInterface;
use
Doctrine\DBAL\ParameterType
;
use
Doctrine\DBAL\ParameterType
;
use
PDO
;
use
PDO
;
use
function
is_string
;
use
function
strpos
;
use
function
substr
;
final
class
Connection
implements
ServerInfoAwareConnection
final
class
Connection
implements
ServerInfoAwareConnection
{
{
/** @var PDOConnection */
/** @var PDOConnection */
...
@@ -40,14 +36,7 @@ final class Connection implements ServerInfoAwareConnection
...
@@ -40,14 +36,7 @@ final class Connection implements ServerInfoAwareConnection
*/
*/
public
function
quote
(
$value
,
$type
=
ParameterType
::
STRING
)
public
function
quote
(
$value
,
$type
=
ParameterType
::
STRING
)
{
{
$val
=
$this
->
connection
->
quote
(
$value
,
$type
);
return
$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
;
}
}
public
function
exec
(
string
$sql
)
:
int
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