[DDC-551] Fixed the escaping of filter parameters
This commit is contained in:
parent
d1908f7207
commit
4cf63a4e83
@ -59,8 +59,7 @@ abstract class SQLFilter
|
||||
throw new \InvalidArgumentException("Parameter '" . $name . "' does not exist.");
|
||||
}
|
||||
|
||||
// @todo: espace the parameter
|
||||
return $this->conn->convertToDatabaseValue($this->parameters[$name]['value'], $this->parameters[$name]['type']);
|
||||
return $this->conn->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']);
|
||||
}
|
||||
|
||||
abstract function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias);
|
||||
|
@ -144,7 +144,7 @@ class SQLFilterTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
// Setup mock connection
|
||||
$conn = $this->getMockConnection();
|
||||
$conn->expects($this->once())
|
||||
->method('convertToDatabaseValue')
|
||||
->method('quote')
|
||||
->with($this->equalTo('en'))
|
||||
->will($this->returnValue("'en'"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user