-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Fake file creation fails #30641
Comments
For now we can "work around" the problem by just passing the number of kilobytes as an integer (which is probably what the developer who wrote our test intended anyway) but I thought I should flag this up. |
Bit torn on this being a bug or not since the docblock clearly marked it that you should pass an int. I think I'm gonna close this up as the current api was just expanded rather than changed. Thanks for reporting this though. |
Well, okay, but it seems odd to me that the call to file_put_contents() is there at all, given that it will never succeed. It's a useless line of code. We've worked around the problem in our code so in future we'll just remember to always pass an int. |
@vroomfondle ah I misunderstood the actual problem. Thanks for mentioning this. We'll look into it 👍 |
Seems like this is already fixed in #30632. Will be good for the next release. |
n/a
Description:
In our tests we create a fake file:
This causes an error:
I believe the bug was introduced in 181db51
The return value of
tmpfile()
is being passed tofile_put_contents()
. However,tmpfile()
returns a resource, whereasfile_put_contents()
expects a string containing a path.Steps To Reproduce:
The text was updated successfully, but these errors were encountered: