From 920331e74ea2be3fcecce06d18052fed41b494fb Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Mon, 15 Feb 2021 19:45:23 +0100 Subject: [PATCH] MDL-70901 cache: @ no longer masks errors in unlink in php 8 --- cache/stores/file/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache/stores/file/lib.php b/cache/stores/file/lib.php index dd5e05825e4..0c08710d551 100644 --- a/cache/stores/file/lib.php +++ b/cache/stores/file/lib.php @@ -399,7 +399,7 @@ class cachestore_file extends cache_store implements cache_is_key_aware, cache_i public function delete($key) { $filename = $key.'.cache'; $file = $this->file_path_for_key($key); - if (@unlink($file)) { + if (file_exists($file) && @unlink($file)) { unset($this->keys[$filename]); return true; }