From f4947bfa939d46af0ccb583d8d3027666c5ab93a Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Wed, 24 May 2023 04:06:31 -0600 Subject: [PATCH] Use trim() function when format the custom field values as array --- app/Models/CustomField.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/CustomField.php b/app/Models/CustomField.php index b39650e74b..94adbe7cf0 100644 --- a/app/Models/CustomField.php +++ b/app/Models/CustomField.php @@ -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]); } } }