Skip to content

Commit

Permalink
Added return clause to processor class upload method
Browse files Browse the repository at this point in the history
  • Loading branch information
todstoychev committed Nov 11, 2015
1 parent 706d903 commit 74a3c7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,16 @@ public function setDirectoryTreeReader(DirectoryTreeReader $directoryTreeReader)
*
* @param UploadedFile $uploadedFile
* @param string $context
* @return \Exception
* @return \Exception|string
*/
public function upload(UploadedFile $uploadedFile, $context)
{
try {
$fileName = $this->uploadImage($uploadedFile, $context);

$this->processImage($context, $fileName);

return $fileName;
} catch (\Exception $e) {
$this->getDeleteImageHandler()->deleteImage($context, $fileName);

Expand Down

0 comments on commit 74a3c7c

Please sign in to comment.