Squash unlink warning in CcFiles.php

This commit is contained in:
Albert Santoni 2015-03-25 10:51:51 -04:00
parent 48b4eaacd6
commit 99d16444d2
1 changed files with 4 additions and 3 deletions

View File

@ -95,9 +95,10 @@ class CcFiles extends BaseCcFiles {
try {
self::createAndImport($fileArray, $tempFilePath, $originalFilename);
} catch (Exception $e)
{
@unlink($tempFilePath);
} catch (Exception $e) {
if (file_exists($tempFilePath)) {
unlink($tempFilePath);
}
throw $e;
}
}