Skip to content

Commit

Permalink
Cleanup double assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
zbateson committed Nov 10, 2023
1 parent 0d9ff1c commit 999ef2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Header/Part/MimeLiteralPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ protected function decodeMime(string $value) : string
{
$pattern = self::MIME_PART_PATTERN;
// remove whitespace between two adjacent mime encoded parts
$value = \preg_replace("/($pattern)\\s+(?=$pattern)/", '$1', $value);
$normed = \preg_replace("/($pattern)\\s+(?=$pattern)/", '$1', $value);
// with PREG_SPLIT_DELIM_CAPTURE, matched and unmatched parts are returned
$aMimeParts = \preg_split("/($pattern)/", $value, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
$aMimeParts = \preg_split("/($pattern)/", $normed, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
$ret = '';
foreach ($aMimeParts as $entity) {
$ret .= $this->decodeSplitPart($entity);
Expand Down

0 comments on commit 999ef2b

Please sign in to comment.