Trim whitespace in combined import fields
authorsstamer <s.stamer@metaways.de>
Mon, 11 Apr 2016 09:46:35 +0000 (11:46 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 11 Apr 2016 10:30:07 +0000 (12:30 +0200)
Change-Id: Ie2fe5153ef0e8669af0023280933c89922546e9b
Reviewed-on: http://gerrit.tine20.com/customers/3029
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Import/Csv/Abstract.php

index e3e4a8d..fb00a89 100644 (file)
@@ -198,7 +198,7 @@ abstract class Tinebase_Import_Csv_Abstract extends Tinebase_Import_Abstract
             if (isset($field['destinations']) && isset($field['destinations']['destination'])) {
                 $destinations = $field['destinations']['destination'];
                 $delimiter = isset($field['$separator']) && ! empty($field['$separator']) ? $field['$separator'] : ' ';
-                $values = explode($delimiter, $value, count($destinations));
+                $values = array_map('trim', explode($delimiter, $value, count($destinations)));
                 if (Tinebase_Core::isLogLevel(Zend_Log::TRACE)) Tinebase_Core::getLogger()->trace(__METHOD__ . '::' . __LINE__
                     . ' values: ' . print_r($values, true));
                 $i = 0;