fix storing multiple-choice-select values, thx to 21MILEX on Discord, fixes #1269
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -232,7 +232,7 @@ class Data
|
|||||||
{
|
{
|
||||||
$returnvalue = true;
|
$returnvalue = true;
|
||||||
|
|
||||||
if (isset($fielddata['option_mode']) && $fielddata['option_mode'] == 'multiple') {
|
if (isset($fielddata['select_mode']) && $fielddata['select_mode'] == 'multiple') {
|
||||||
$options = explode(',', $newfieldvalue);
|
$options = explode(',', $newfieldvalue);
|
||||||
foreach ($options as $option) {
|
foreach ($options as $option) {
|
||||||
$returnvalue = ($returnvalue && isset($fielddata['select_var'][$option]));
|
$returnvalue = ($returnvalue && isset($fielddata['select_var'][$option]));
|
||||||
@@ -247,7 +247,7 @@ class Data
|
|||||||
if (isset($fielddata['option_emptyallowed']) && $fielddata['option_emptyallowed']) {
|
if (isset($fielddata['option_emptyallowed']) && $fielddata['option_emptyallowed']) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return 'not in option';
|
return 'not in option (field: ' . $fieldname . ')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user