From d94b15cc68caa26dfdf6bb902283aa80e6b2b81c Mon Sep 17 00:00:00 2001 From: Karol Babioch Date: Wed, 12 Dec 2012 17:40:03 +0100 Subject: [PATCH] Zend\Mime\Part: Added EOL paramter to getEncodedStream() --- library/Zend/Mime/Part.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/Zend/Mime/Part.php b/library/Zend/Mime/Part.php index a3f01f56e53..9143dbef48f 100644 --- a/library/Zend/Mime/Part.php +++ b/library/Zend/Mime/Part.php @@ -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'); @@ -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)) { @@ -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)) { @@ -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); }