- check if file exists before unlinking
diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php
index 6c37e70..2a89faf 100644
--- a/system/libraries/Cache/drivers/Cache_file.php
+++ b/system/libraries/Cache/drivers/Cache_file.php
@@ -107,7 +107,14 @@
*/
public function delete($id)
{
- return unlink($this->_cache_path.$id);
+ if (file_exists($this->_cache_path.$id))
+ {
+ return unlink($this->_cache_path.$id);
+ }
+ else
+ {
+ return FALSE;
+ }
}
// ------------------------------------------------------------------------
@@ -192,4 +199,4 @@
// End Class
/* End of file Cache_file.php */
-/* Location: ./system/libraries/Cache/drivers/Cache_file.php */
\ No newline at end of file
+/* Location: ./system/libraries/Cache/drivers/Cache_file.php */