Browse Source

Merge pull request #16375 from markusramsak/patch-17

Avoid possible TypeError Exception
Mark Story 4 years ago
parent
commit
659c0ffec6
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/Cache/Engine/FileEngine.php

+ 4 - 0
src/Cache/Engine/FileEngine.php

@@ -223,6 +223,10 @@ class FileEngine extends CacheEngine
         $path = $this->_File->getRealPath();
         $this->_File = null;
 
+        if ($path === false) {
+            return false;
+        }
+
         // phpcs:disable
         return @unlink($path);
         // phpcs:enable