Allow `set('column', 'null')` to work like in Doctrine

This commit is contained in:
Joas Schilling 2015-09-24 08:59:19 +02:00 committed by Thomas Müller
parent 158c962fcc
commit 70572c1e3c
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'],
];
}