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

as my previous PR #2454

Closed
wants to merge 2 commits into from
Closed

as my previous PR #2454

wants to merge 2 commits into from

Conversation

agiuliano
Copy link
Contributor

fix the other setFile(null)

@mahmouds
Copy link
Contributor

mahmouds commented Apr 3, 2013

@agiuliano something is wrong about the PR the first commit looks good but the second one looks strange and the final file change is wired too https://github.com/symfony/symfony-docs/pull/2454/files , can you please check it again ?
also you should send this PR to the 2.0 branch not master.

@agiuliano
Copy link
Contributor Author

Ok, I sent my PR to 2.0 branch. But I've noted there is the same error in master branch:
https://github.com/symfony/symfony-docs/blob/master/cookbook/doctrine/file_uploads.rst

@mahmouds
Copy link
Contributor

mahmouds commented Apr 3, 2013

@agiuliano you sent the PR from your master branch and this is completely wrong you need to close #2456 and open new one from your 2.0 branch

@mahmouds
Copy link
Contributor

mahmouds commented Apr 3, 2013

@wouterj wouterj mentioned this pull request Apr 3, 2013
@wouterj
Copy link
Member

wouterj commented Apr 3, 2013

We leave this PR open. Ryan can cherrypick the commits into the correct branch. The next, you should think of the correct branch beforing starting on something, that makes our life easier. (you can join us at the #symfony-docs freenode IRC channel if you don't understand our branching techniques)

@agiuliano
Copy link
Contributor Author

thank you! if you want I can rebranch from 2.0 branch and do another PR..

@weaverryan
Copy link
Member

Hi Andrea!

I can easily cherry-pick in your commits, so that's no problem. But what is the intention of this PR? There are 2 commits, one simply moves a setFile call and the other changes setFile to simply ->file. I'm seeing inconsistency between us using the property directly and the setter overall - this document needs a lot of work in general (#2346). What's the intention of this PR?

Thanks!

@agiuliano
Copy link
Contributor Author

Hi weaverryan,
the direct access to file property is because I want only free memory.
If you do setFile(null) is possible made mistakes in further functions, so is a precaution.
Sorry for the 2 commits, if you want I can do the corrections in only one commit.
Thanks

@mahmouds
Copy link
Contributor

@weaverryan the main problem is that the setter position in the upload function is before the check for the temp path, The setter then set the temp path with the current upload path and finally the next check in the upload function will delete the new uploaded file.
see #2453

@weaverryan
Copy link
Member

Hi guys!

Thanks for the clarification - I didn't see the previous PR. I've patched this into the 2.0 branch at sha: 803b3cf and sha: 7bf51a8

Thanks!

@weaverryan weaverryan closed this Apr 11, 2013
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.

4 participants