-
Notifications
You must be signed in to change notification settings - Fork 7.8k
[Bug] 77024 - Correct the behaviour of casting spl files to strings #3820
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test currently fails on Windows. It's probably best not to use a temporary file. Either use SplTempFileObject for the second part as well, or create an actual file for this.
@nikic The second test is to ensure |
If that works, that would be fine as well. |
Or add the unlink() call into the |
Windows build is fixed now 👍 |
Applied via 91c6fb8 to PHP-7.2+. Thank you @duncan3dc and the reviewers... |
Bug #77024
This PR makes
__toString()
in a CSV context consistent with a plain text file.This behaviour contradicts the manual (and common sense as far as I can tell) but this PR ensures backwards compatibility