[BUGFIX] Random PHP warning unlinking valid cache file 13/40713/2
authorXavier Perseguers <xavier@typo3.org>
Mon, 29 Jun 2015 08:07:31 +0000 (10:07 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 14 Jul 2015 21:56:24 +0000 (23:56 +0200)
Sometimes, although a valid cache path and filename is given to unlink(),
it generates a PHP warning as if the file did not exist.

Change-Id: I3ff65cafaf22cb925a9ce395aa9d0fb52ee2b529
Resolves: #67802
Releases: master
Reviewed-on: http://review.typo3.org/40713
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Classes/Cache/Backend/FileBackend.php

index e8f7a3d..64ec0f8 100644 (file)
@@ -237,7 +237,7 @@ class FileBackend extends \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend implem
                if (file_exists($pathAndFilename) === FALSE) {
                        return FALSE;
                }
-               if (unlink($pathAndFilename) === FALSE) {
+               if (@unlink($pathAndFilename) === FALSE) {
                        return FALSE;
                }
                return TRUE;