[BUGFIX] unlink issues warnings for lock files
authorMarkus Klein <klein.t3@mfc-linz.at>
Sat, 3 Dec 2011 20:08:54 +0000 (14:08 -0600)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 1 Aug 2012 16:55:11 +0000 (18:55 +0200)
t3lib_lock issues warnings for non-existent lock files.

Change-Id: I55df9938cf56825cd808195f74f10582d2ecedad
Fixes: #32282
Releases: 4.7, 4.6, 4.5, 4.4
Reviewed-on: http://review.typo3.org/12831
Reviewed-by: Marcus Schwemer
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
t3lib/class.t3lib_lock.php

index aebcfb9..8a4cf2a 100644 (file)
@@ -207,7 +207,7 @@ class t3lib_lock {
                switch ($this->method) {
                        case 'simple':
                                if (t3lib_div::isAllowedAbsPath($this->resource) && t3lib_div::isFirstPartOfStr($this->resource, PATH_site . 'typo3temp/locks/')) {
-                                       if (unlink($this->resource) == FALSE) {
+                                       if (@unlink($this->resource) == FALSE) {
                                                $success = FALSE;
                                        }
                                }
@@ -218,7 +218,7 @@ class t3lib_lock {
                                }
                                fclose($this->filepointer);
                                if (t3lib_div::isAllowedAbsPath($this->resource) && t3lib_div::isFirstPartOfStr($this->resource, PATH_site . 'typo3temp/locks/')) {
-                                       unlink($this->resource);
+                                       @unlink($this->resource);
                                }
                        break;
                        case 'semaphore':