8000 minor #8081 File example update (runawaycoin) · symfony/symfony-docs@8b4487b · GitHub
[go: up one dir, main page]

Skip to content

Commit 8b4487b

Browse files
committed
minor #8081 File example update (runawaycoin)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #8081). Discussion ---------- File example update Update code example to highlight where the $file comes from in second example Commits ------- e7fb1a1 File example update
2 parents 33bf1ac + e7fb1a1 commit 8b4487b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

reference/forms/types/file.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ be used to move the ``attachment`` file to a permanent location::
5050
if ($form->isSubmitted() && $form->isValid()) {
5151
$someNewFilename = ...
5252

53-
$form['attachment']->getData()->move($dir, $someNewFilename);
53+
$file = $form['attachment']->getData();
54+
$file->move($dir, $someNewFilename);
5455

5556
// ...
5657
}

0 commit comments

Comments
 (0)
0