Skip to content

Commit 1af7872

Browse files
committed
fix: SQL error when inconsistency in DB
if a user is linked to a not existing group, a SQL IN statement begins with a comma fix #3242
1 parent 7df2f7a commit 1af7872

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hook.php

+3
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ function plugin_formcreator_addDefaultWhere($itemtype) {
265265

266266
$groupIDs = [];
267267
foreach ($groups as $group) {
268+
if ($group['id'] === null) {
269+
continue;
270+
}
268271
$groupIDs[] = $group['id'];
269272
}
270273
$groupIDs = implode(',', $groupIDs);

0 commit comments

Comments
 (0)