Use trim() function when format the custom field values as array

This commit is contained in:
Ivan Nieto Vivanco 2023-05-24 04:06:31 -06:00
parent 2e5486a62e
commit f4947bfa93

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]);
}
}
}