Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of git://github.com/johnpatcher/zf2 into hotfix…
Browse files Browse the repository at this point in the history
…/3208
  • Loading branch information
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Part.php
Expand Up @@ -73,7 +73,7 @@ public function isStream()
* @return stream
* @throws Exception\RuntimeException if not a stream or unable to append filter
*/
public function getEncodedStream()
public function getEncodedStream($EOL = Mime::LINEEND)
{
if (!$this->isStream) {
throw new Exception\RuntimeException('Attempt to get a stream from a string part');
Expand All @@ -88,7 +88,7 @@ public function getEncodedStream()
STREAM_FILTER_READ,
array(
'line-length' => 76,
'line-break-chars' => Mime::LINEEND
'line-break-chars' => $EOL
)
);
if (!is_resource($filter)) {
Expand All @@ -102,7 +102,7 @@ public function getEncodedStream()
STREAM_FILTER_READ,
array(
'line-length' => 76,
'line-break-chars' => Mime::LINEEND
'line-break-chars' => $EOL
)
);
if (!is_resource($filter)) {
Expand All @@ -123,7 +123,7 @@ public function getEncodedStream()
public function getContent($EOL = Mime::LINEEND)
{
if ($this->isStream) {
return stream_get_contents($this->getEncodedStream());
return stream_get_contents($this->getEncodedStream($EOL));
}
return Mime::encode($this->content, $this->encoding, $EOL);
}
Expand Down

0 comments on commit 3e61a9d

Please sign in to comment.