Merge pull request #13085 from inietov/fixes/checkboxes_not_holding_value

Fixed #12978 Custom Field Checkboxes not holding assigned values
This commit is contained in:
snipe 2023-05-31 10:55:37 -04:00 committed by GitHub
commit e431cd5146
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -306,9 +306,9 @@ class CustomField extends Model
$arr_parts = explode('|', $arr[$x]);
if ($arr_parts[0] != '') {
if (array_key_exists('1', $arr_parts)) {
$result[$arr_parts[0]] = $arr_parts[1];
$result[$arr_parts[0]] = trim($arr_parts[1]);
} else {
$result[$arr_parts[0]] = $arr_parts[0];
$result[$arr_parts[0]] = trim($arr_parts[0]);
}
}
}