mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Use trim() function when format the custom field values as array
This commit is contained in:
parent
2e5486a62e
commit
f4947bfa93
|
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue