Merge pull request #19326 from owncloud/issue-19314-querybuilder-set-null

Allow `set('column', 'null')` to work like in Doctrine's QueryBuilder
This commit is contained in:
Thomas Müller 2015-09-24 10:57:49 +02:00
commit 11974477bd
2 changed files with 5 additions and 1 deletions

View file

@ -52,7 +52,7 @@ class QuoteHelper {
return (string) $string;
}
if ($string === null || $string === '*') {
if ($string === null || $string === 'null' || $string === '*') {
return $string;
}

View file

@ -43,6 +43,10 @@ class QuoteHelperTest extends \Test\TestCase {
[new Literal('literal'), 'literal'],
[new Literal(1), '1'],
[new Parameter(':param'), ':param'],
// (string) 'null' is Doctrines way to set columns to null
// See https://github.com/owncloud/core/issues/19314
['null', 'null'],
];
}