[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:54:44 +0000 (18:54 +0200)
t3lib_lock issues warnings for non-existent lock files.

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

index 71787a4..eeadfd5 100644 (file)
@@ -237,7 +237,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;
                                        }
                                }
@@ -248,7 +248,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':