[Bug] 77024 - Correct the behaviour of casting spl files to strings #3820
[Bug] 77024 - Correct the behaviour of casting spl files to strings #3820duncan3dc wants to merge 2 commits intophp:PHP-7.2from
Conversation
nikic
left a comment
There was a problem hiding this comment.
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