Skip to content
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

[6.x] Fix method and remove duplication #30632

Merged
merged 3 commits into from
Nov 20, 2019

Conversation

shadoWalker89
Copy link
Contributor

The tweak made by taylor on the on the FileFactory::create() has two problems

1- Using file_put_contents() on a resource this causes the following problem
ErrorException : file_put_contents() expects parameter 1 to be a valid path, resource given

2- Second one using the $tmp inside the closure without passing it via use() this will cause an undefined variable error.

Instead of applying fixes to these two problems i restaured the original code of the create() method plus checking if the $kilobytes is a string, if so i'll just call the createWithContent() instead

@taylorotwell taylorotwell merged commit 8acfa75 into laravel:6.x Nov 20, 2019
@shadoWalker89 shadoWalker89 deleted the fix_the_create_method branch December 1, 2019 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants