-
Notifications
You must be signed in to change notification settings - Fork 7.8k
str_getcsv returns null byte for unterminated quoted string #11982
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
Comments
I have done some debugging and I think this might be actually a bug that is worth a fix. I see the point about the BC as some apps might potentially rely on that but I think we could still fix it in 8.3 potentially. Specifically this output really does not make any sense to me:
results to
As can be seen the current logic is to ignore missing enclosing character at the end. But in the case of empty strings, it prints |
The fix for this is in GH-12047 . It took me quite a bit of time to just figure out how that old (created 20 years ago) parser works. At least I have got some knowledge of that now... |
Description
The following code:
Resulted in this output:
But I expected this output instead:
https://3v4l.org/TI1vo
PHP Version
PHP 5.3.0 to now
Operating System
No response
The text was updated successfully, but these errors were encountered: