8000 [cookbook][doctrine] Clarifying file upload exception message to avoi… · web-dev/symfony-docs@2924dde · GitHub
[go: up one dir, main page]

Skip to content

Commit 2924dde

Browse files
committed
[cookbook][doctrine] Clarifying file upload exception message to avoid confusion - closes symfony#908
1 parent 9ffb647 commit 2924dde

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cookbook/doctrine/file_uploads.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ Next, refactor the ``Document`` class to take advantage of these callbacks::
277277
return;
278278
}
279279

280-
// you must throw an exception here if the file cannot be moved
281-
// so that the entity is not persisted to the database
282-
// which the UploadedFile move() method does automatically
280+
// if there is an error when moving the file, an exception will
281+
// be automatically thrown by move(). This will properly prevent
282+
// the entity from being persisted to the database on error
283283
$this->file->move($this->getUploadRootDir(), $this->path);
284284

285285
unset($this->file);

0 commit comments

Comments
 (0)
0