Skip to content
This repository has been archived by the owner on Aug 5, 2018. It is now read-only.

Commit

Permalink
Throw an error on cs_unlink if the file to be removed doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Eike Broda committed Jan 26, 2015
1 parent 9260521 commit abb51f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions system/core/tools.php
Expand Up @@ -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) {
Expand Down Expand Up @@ -633,4 +635,4 @@ function cs_userstatus($laston = 0, $invisible = 0, $mode = 0) {
}
if ($mode == 1) return $text;
return $mode == 2 ? $icon . ' ' . $text : $icon;
}
}

0 comments on commit abb51f7

Please sign in to comment.