diff --git a/cookbook/doctrine/file_uploads.rst b/cookbook/doctrine/file_uploads.rst index 95a06bd7672..fa400525187 100644 --- a/cookbook/doctrine/file_uploads.rst +++ b/cookbook/doctrine/file_uploads.rst @@ -404,7 +404,8 @@ Next, refactor the ``Document`` class to take advantage of these callbacks:: */ public function removeUpload() { - if ($file = $this->getAbsolutePath()) { + $file = $this->getAbsolutePath(); + if ($file) { unlink($file); } }