Commit d3ef9008 authored by Alan Davison's avatar Alan Davison
Browse files

Issue #1210072 by Vc Developer, Alan D.: PDOException from using condition(type, types, NOT IN).

parent 0bc8cf7d
......@@ -156,9 +156,16 @@ function search_config_query_node_access_alter(QueryAlterableInterface $query) {
}
}
// A core bug results in a DB error if we use the following: Ref: #1210072
// $query->condition($node . '.type', array($excluded_content_types), 'NOT IN');
if (!empty($excluded_content_types)) {
$query->condition($node . '.type', array($excluded_content_types), 'NOT IN');
$db_and = db_and();
foreach ($excluded_content_types as $type) {
$db_and->condition($node . '.type', $type, '!=');
}
$query->condition($db_and);
}
}
}
......
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