Skip to content

Prevent parsing invalid octal digits as octal numbers #38099

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

Merged
merged 1 commit into from
Sep 8, 2020

Conversation

julienfalque
Copy link
Contributor

Q A
Branch? 3.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

Values starting with 0 but containing 8 or 9 such as 0123456789 are not valid octal numbers, therefore they should be parsed as regular strings. This is consistent with how other invalid octal values are parsed, e.g. 01234567ab already gets parsed as the string "01234567ab".

Copy link
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

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

Tested with other libs and they behave the same.

@fabpot
Copy link
Member

fabpot commented Sep 8, 2020

Thank you @julienfalque.

@fabpot fabpot merged commit 91b6739 into symfony:3.4 Sep 8, 2020
@julienfalque julienfalque deleted the fix-yaml-octal-digits branch September 8, 2020 06:50
This was referenced Sep 27, 2020
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.

4 participants