Skip to content

Commit

Permalink
Merge pull request #4148 from morozov/pdo-sqlsrv-quote
Browse files Browse the repository at this point in the history
Remove workaround in PDOSqlsrv\Connection::quote()
  • Loading branch information
morozov authored Jul 5, 2020
2 parents 13e73f1 + da2349e commit 7dc2138
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
namespace Doctrine\DBAL\Driver\PDOSqlsrv;

use Doctrine\DBAL\Driver\PDOConnection;
use Doctrine\DBAL\ParameterType;
use PDO;
use function is_string;
use function strpos;
use function substr;

/**
* Sqlsrv Connection implementation.
Expand Down Expand Up @@ -37,19 +33,4 @@ public function lastInsertId($name = null)

return $stmt->fetchColumn();
}

/**
* {@inheritDoc}
*/
public function quote($value, $type = ParameterType::STRING)
{
$val = parent::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;
}
}

0 comments on commit 7dc2138

Please sign in to comment.