Skip to content

Commit 8e4d049

Browse files
committed
fix(condition): empty sql IN statement
1 parent c9f0f79 commit 8e4d049

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

inc/condition.class.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,11 @@ public function getConditionHtml(array $input) : string {
373373
foreach ($sections as $section) {
374374
$sectionsList[] = $section->getID();
375375
}
376-
$questionListExclusion[] = [
377-
PluginFormcreatorSection::getForeignKeyField() => $sectionsList,
378-
];
376+
if (count($sectionsList) > 0) {
377+
$questionListExclusion[] = [
378+
PluginFormcreatorSection::getForeignKeyField() => $sectionsList,
379+
];
380+
}
379381
$html.= '<div class="div_show_condition_field">';
380382
$html .= PluginFormcreatorQuestion::dropdownForForm(
381383
$form->getID(),

0 commit comments

Comments
 (0)