Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
bbf9c0a6
Commit
bbf9c0a6
authored
Nov 02, 2009
by
webchick
Browse files
#620516
by Crell: Use isNull() inside SQLite driver.
parent
267c290c
Changes
1
Show whitespace changes
Inline
Side-by-side
includes/database/sqlite/query.inc
View file @
bbf9c0a6
...
...
@@ -92,18 +92,15 @@ public function execute() {
if
(
is_array
(
$data
))
{
// The field is an expression.
$condition
->
condition
(
$field
,
$data
[
'expression'
],
'<>'
);
// The IS NULL operator is badly managed by DatabaseCondition.
$condition
->
where
(
$field
.
' IS NULL'
);
$condition
->
isNull
(
$field
);
}
elseif
(
is_null
(
$data
))
{
// The field will be set to NULL.
// The IS NULL operator is badly managed by DatabaseCondition.
$condition
->
where
(
$field
.
' IS NOT NULL'
);
$condition
->
isNull
(
$field
);
}
else
{
$condition
->
condition
(
$field
,
$data
,
'<>'
);
// The IS NULL operator is badly managed by DatabaseCondition.
$condition
->
where
(
$field
.
' IS NULL'
);
$condition
->
isNull
(
$field
);
}
}
if
(
count
(
$condition
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment