Unverified Commit 7dc21385 authored by Sergei Morozov's avatar Sergei Morozov Committed by GitHub

Merge pull request #4148 from morozov/pdo-sqlsrv-quote

Remove workaround in PDOSqlsrv\Connection::quote()
parents 13e73f10 da2349e4
......@@ -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.
......@@ -37,19 +33,4 @@ class Connection extends PDOConnection
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;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment