bug #30500 [Mime] fixed wrong logic (fabpot)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mime] fixed wrong logic

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

836970c776 [Mime] fixed wrong logic
This commit is contained in:
Fabien Potencier 2019-03-09 18:03:15 +01:00
commit c1f24182ef

View File

@ -20,7 +20,9 @@ final class EightBitContentEncoder implements ContentEncoderInterface
{
public function encodeByteStream($stream, int $maxLineLength = 0): iterable
{
yield from $stream;
while (!feof($stream)) {
yield fread($stream, 16372);
}
}
public function getName(): string