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

fix #5428 only read the stream contents once #5570

Closed

Conversation

jeremyquinton
Copy link
Contributor

A suggestion for a fix. I think the getRawContent might also need the change.

@jeremyquinton
Copy link
Contributor Author

Only apply the filter once to a stream and when reading the stream use rewind to go to the start of the stream. This seems to fixes the issue.

@@ -79,6 +80,7 @@ public function getEncodedStream($EOL = Mime::LINEEND)
//stream_filter_remove(); // ??? is that right?
switch ($this->encoding) {
case Mime::ENCODING_QUOTEDPRINTABLE:
if(array_search(Mime::ENCODING_QUOTEDPRINTABLE, $this->filters) !== FALSE) break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weierophinney weierophinney added this to the 2.2.6 milestone Mar 3, 2014
@weierophinney weierophinney self-assigned this Mar 3, 2014
weierophinney added a commit that referenced this pull request Mar 3, 2014
fix #5428 only read the stream contents once
weierophinney added a commit that referenced this pull request Mar 3, 2014
- Braces, whitespace.
- Incorrect variable references in tests caused them to fail; fixing them makes
  them pass.
weierophinney added a commit that referenced this pull request Mar 3, 2014
weierophinney added a commit to zendframework/zend-mime that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-mime that referenced this pull request May 15, 2015
- Braces, whitespace.
- Incorrect variable references in tests caused them to fail; fixing them makes
  them pass.
weierophinney added a commit to zendframework/zend-mime that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-mime that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants