Skip to content
Snippets Groups Projects
Unverified Commit d819ca1c authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #17622 from seamuslee001/smart_group_error

Fix issue with building smart groups when  is empty
parents 4b60f424 b5da02a4
Branches
Tags
No related merge requests found
......@@ -489,7 +489,9 @@ WHERE id IN ( $groupIDs )
$tempTable = $groupContactsTempTable->getName();
$groupContactsTempTable->createWithColumns('contact_id int, group_id int, UNIQUE UI_contact_group (contact_id,group_id)');
$contactQueries[] = $sql;
if (!empty($sql)) {
$contactQueries[] = $sql;
}
// lets also store the records that are explicitly added to the group
// this allows us to skip the group contact LEFT JOIN
$contactQueries[] =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment