Use trim() function when format the custom field values as array
This commit is contained in:
parent
2e5486a62e
commit
f4947bfa93
1 changed files with 2 additions and 2 deletions
|
@ -306,9 +306,9 @@ class CustomField extends Model
|
||||||
$arr_parts = explode('|', $arr[$x]);
|
$arr_parts = explode('|', $arr[$x]);
|
||||||
if ($arr_parts[0] != '') {
|
if ($arr_parts[0] != '') {
|
||||||
if (array_key_exists('1', $arr_parts)) {
|
if (array_key_exists('1', $arr_parts)) {
|
||||||
$result[$arr_parts[0]] = $arr_parts[1];
|
$result[$arr_parts[0]] = trim($arr_parts[1]);
|
||||||
} else {
|
} else {
|
||||||
$result[$arr_parts[0]] = $arr_parts[0];
|
$result[$arr_parts[0]] = trim($arr_parts[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue