From e77d39b33f9b6b856b994f15b3a433af177c606b Mon Sep 17 00:00:00 2001 From: Sebastian Castro Date: Thu, 16 Jan 2020 17:14:37 +0100 Subject: [PATCH] Import Categories with space at beginning or the end --- CHANGELOG.md | 4 ++++ app/config/version.yml | 2 +- .../Services/ElementImportMappingService.php | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dac63bfb..9c58c300 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +v2.5.8 +====== +* BUG: Import Categories with space at beginning or the end + v2.5.7 ====== * BUG: Prevent circular reference between categories and options diff --git a/app/config/version.yml b/app/config/version.yml index 7e99de4a..0ebab083 100755 --- a/app/config/version.yml +++ b/app/config/version.yml @@ -1,2 +1,2 @@ parameters: - app.version: 2.5.7 \ No newline at end of file + app.version: 2.5.8 \ No newline at end of file diff --git a/src/Biopen/GeoDirectoryBundle/Services/ElementImportMappingService.php b/src/Biopen/GeoDirectoryBundle/Services/ElementImportMappingService.php index aed4022a..c4a30bf0 100644 --- a/src/Biopen/GeoDirectoryBundle/Services/ElementImportMappingService.php +++ b/src/Biopen/GeoDirectoryBundle/Services/ElementImportMappingService.php @@ -318,6 +318,7 @@ class ElementImportMappingService foreach ($row['categories'] as $category) { $val = is_array($category) ? $category['name'] : $category; + $val = ltrim(rtrim($val)); if (isset($mapping[$val]) && $mapping[$val]) { foreach ($mapping[$val] as $mappedCategory) { -- GitLab