Skip to content

Commit

Permalink
Use stream_filter_append on read for all HHVM
Browse files Browse the repository at this point in the history
  • Loading branch information
zbateson committed Jul 10, 2017
1 parent 71d2a0a commit ed9bb72
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions src/Message/Writer/MimePartWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,12 @@ private function setTransferEncodingFilterOnStream(MimePart $part, $handle, Stre
)
]);
if (isset(self::$typeToEncodingMap[$encoding])) {
if (defined('HHVM_VERSION') && HHVM_VERSION < '3.18.0') {
return stream_filter_append(
$handle,
self::$typeToEncodingMap[$encoding],
STREAM_FILTER_WRITE,
$params
);
} else {
return stream_filter_append(
$contentHandle,
self::$typeToEncodingMap[$encoding],
STREAM_FILTER_READ,
$params
);
}
return stream_filter_append(
$contentHandle,
self::$typeToEncodingMap[$encoding],
STREAM_FILTER_READ,
$params
);
}
return null;
}
Expand Down

0 comments on commit ed9bb72

Please sign in to comment.