Skip to content

Commit

Permalink
fix storing multiple-choice-select values, thx to 21MILEX on Discord, f…
Browse files Browse the repository at this point in the history
…ixes #1269

Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Aug 24, 2024
1 parent e6bfe20 commit 5521260
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Froxlor/Validate/Form/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public static function validateFormFieldSelect($fieldname, $fielddata, $newfield
{
$returnvalue = true;

if (isset($fielddata['option_mode']) && $fielddata['option_mode'] == 'multiple') {
if (isset($fielddata['select_mode']) && $fielddata['select_mode'] == 'multiple') {
$options = explode(',', $newfieldvalue);
foreach ($options as $option) {
$returnvalue = ($returnvalue && isset($fielddata['select_var'][$option]));
Expand All @@ -247,7 +247,7 @@ public static function validateFormFieldSelect($fieldname, $fielddata, $newfield
if (isset($fielddata['option_emptyallowed']) && $fielddata['option_emptyallowed']) {
return true;
}
return 'not in option';
return 'not in option (field: ' . $fieldname . ')';
}
}

Expand Down

0 comments on commit 5521260

Please sign in to comment.