From: martinml Date: Fri, 20 Apr 2012 18:01:06 +0000 (+0300) Subject: Silence chmod() warnings (operation not permitted) when using CIFS mounts and possibl... X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=3eecc609f4b4e55635efcb1816a460b63e489ae0;p=konrad%2Ftwig.git Silence chmod() warnings (operation not permitted) when using CIFS mounts and possibly other cases. --- diff --git a/lib/Twig/Environment.php b/lib/Twig/Environment.php index 6c47326..88eaf90 100644 --- a/lib/Twig/Environment.php +++ b/lib/Twig/Environment.php @@ -1069,7 +1069,7 @@ class Twig_Environment if (false !== @file_put_contents($tmpFile, $content)) { // rename does not work on Win32 before 5.2.6 if (@rename($tmpFile, $file) || (@copy($tmpFile, $file) && unlink($tmpFile))) { - chmod($file, 0644); + @chmod($file, 0644); return; }