From 8e4d049168c1c9ac08505031df5b2158bec1b5ca Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Thu, 7 Apr 2022 15:56:56 +0200 Subject: [PATCH] fix(condition): empty sql IN statement --- inc/condition.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/condition.class.php b/inc/condition.class.php index 3e936fa5b..16a00757f 100644 --- a/inc/condition.class.php +++ b/inc/condition.class.php @@ -373,9 +373,11 @@ public function getConditionHtml(array $input) : string { foreach ($sections as $section) { $sectionsList[] = $section->getID(); } - $questionListExclusion[] = [ - PluginFormcreatorSection::getForeignKeyField() => $sectionsList, - ]; + if (count($sectionsList) > 0) { + $questionListExclusion[] = [ + PluginFormcreatorSection::getForeignKeyField() => $sectionsList, + ]; + } $html.= '
'; $html .= PluginFormcreatorQuestion::dropdownForForm( $form->getID(),