Fixed bug #12195: Renaming write protected file issues a php warning
authorRupert Germann <rupi@gmx.li>
Tue, 17 Nov 2009 17:10:23 +0000 (17:10 +0000)
committerRupert Germann <rupi@gmx.li>
Tue, 17 Nov 2009 17:10:23 +0000 (17:10 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6455 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_extfilefunc.php

index cf4c697..58963d3 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * Fixed bug #12455: OpenID authentication does not work with PHP 5.3
        * Fixed bug #12054: PHP5.3-Warning about strcmp() parameters in view_help.php (thanks to Stefan Geith)
+       * Fixed bug #12195: Renaming write protected file issues a php warning
 
 2009-11-17  Oliver Hader  <oliver@typo3.org>
 
index 640f0fd..5b5b2f4 100644 (file)
@@ -574,7 +574,7 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
                                                if ($this->checkIfAllowed($fI['fileext'], $theDest, $fI['file'])) {
                                                        if ($this->checkPathAgainstMounts($theDestFile) && $this->checkPathAgainstMounts($theFile))     {
                                                                if ($this->PHPFileFunctions)    {
-                                                                       rename($theFile, $theDestFile);
+                                                                       @rename($theFile, $theDestFile);
                                                                } else {
                                                                        $cmd = 'mv "'.$theFile.'" "'.$theDestFile.'"';
                                                                        exec($cmd);
@@ -607,7 +607,7 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions       {
                                                        if ($this->checkIfFullAccess($theDest) || $this->is_webPath($theDestFile)==$this->is_webPath($theFile)) {       // // no moving of folders between spaces
                                                                if ($this->checkPathAgainstMounts($theDestFile) && $this->checkPathAgainstMounts($theFile))     {
                                                                        if ($this->PHPFileFunctions)    {
-                                                                               rename($theFile, $theDestFile);
+                                                                               @rename($theFile, $theDestFile);
                                                                        } else {
                                                                                $cmd = 'mv "'.$theFile.'" "'.$theDestFile.'"';
                                                                                $errArr = array();