From abb51f70fe578e2f78d6b8db0cae344989ef5ccd Mon Sep 17 00:00:00 2001 From: Eike Broda Date: Tue, 27 Jan 2015 00:32:05 +0100 Subject: [PATCH] Throw an error on cs_unlink if the file to be removed doesn't exist --- system/core/tools.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/core/tools.php b/system/core/tools.php index 537a90e9..c20f7e71 100644 --- a/system/core/tools.php +++ b/system/core/tools.php @@ -531,8 +531,10 @@ function cs_unlink($mod, $filename, $sub = '') { return FALSE; } } - else + else { + cs_error($target,'cs_unlink - Failed to remove the file because file doesn\'t exist'); return FALSE; + } } function cs_upload($mod,$filename,$upname, $ajaxclean = 1) { @@ -633,4 +635,4 @@ function cs_userstatus($laston = 0, $invisible = 0, $mode = 0) { } if ($mode == 1) return $text; return $mode == 2 ? $icon . ' ' . $text : $icon; -} \ No newline at end of file +}