Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Yaml] ensures that the mb_internal_encoding is reset to its initial value #29571

Merged
merged 1 commit into from Dec 11, 2018

Conversation

Jola
Copy link

@Jola Jola commented Dec 11, 2018

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

When Symfony\Component\Yaml\Inline::parse sets the internal encoding to ASCII and the method does an early return or throws an exception, the internal encoding would not be reset.
This Patch ensures the reset of the encoding by moving it into a finally block.

@nicolas-grekas nicolas-grekas changed the title [Yaml] ensures that the mb_internal_encoding is reset to its initial… [Yaml] ensures that the mb_internal_encoding is reset to its initial value Dec 11, 2018
@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Dec 11, 2018
@xabbuh
Copy link
Member

xabbuh commented Dec 11, 2018

Thank you @Jola.

@xabbuh xabbuh merged commit 56ab129 into symfony:3.4 Dec 11, 2018
xabbuh added a commit that referenced this pull request Dec 11, 2018
…ts initial value (Jörn Lang)

This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] ensures that the mb_internal_encoding is reset to its initial value

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

When `Symfony\Component\Yaml\Inline::parse` sets the internal encoding to ASCII and the method does an early return or throws an exception, the internal encoding would not be reset.
This Patch ensures the reset of the encoding by moving it into a finally block.

Commits
-------

56ab129 [Yaml] ensures that the mb_internal_encoding is reset to its initial value
This was referenced Jan 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants