From 99d16444d26633d154cb0ed75e6ca20d85e084b3 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Wed, 25 Mar 2015 10:51:51 -0400 Subject: [PATCH] Squash unlink warning in CcFiles.php --- airtime_mvc/application/models/airtime/CcFiles.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/models/airtime/CcFiles.php b/airtime_mvc/application/models/airtime/CcFiles.php index 029d21a15..ff9d3d7fc 100644 --- a/airtime_mvc/application/models/airtime/CcFiles.php +++ b/airtime_mvc/application/models/airtime/CcFiles.php @@ -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; } }