diff --git a/src/Header/AbstractAddressList.php b/src/Header/AbstractAddressList.php index 4ccd38bb..87f76c77 100644 --- a/src/Header/AbstractAddressList.php +++ b/src/Header/AbstractAddressList.php @@ -58,7 +58,12 @@ public static function fromString($headerLine) // split value on "," $fieldValue = str_replace(Headers::FOLDING, ' ', $fieldValue); $values = explode(',', $fieldValue); - array_walk($values, 'trim'); + array_walk( + $values, + function (&$value) { + $value = trim($value); + } + ); $addressList = $header->getAddressList(); foreach ($values as $address) {