Fix logic bugs

This commit is contained in:
Julien Nahum
2024-01-17 14:26:31 +01:00
parent 8655f8d92e
commit dc3608f085
5 changed files with 49 additions and 40 deletions

View File

@@ -83,6 +83,10 @@ class FormLogicConditionChecker
private function checkListContains ($condition, $fieldValue): bool {
if (is_null($fieldValue)) return false;
if (!is_array($fieldValue)) {
return $this->checkEquals($condition, $fieldValue);
}
if (is_array($condition['value'])) {
return count(array_intersect($condition['value'], $fieldValue)) === count($condition['value']);
} else {