From 3eecc609f4b4e55635efcb1816a460b63e489ae0 Mon Sep 17 00:00:00 2001 From: martinml Date: Fri, 20 Apr 2012 21:01:06 +0300 Subject: [PATCH] Silence chmod() warnings (operation not permitted) when using CIFS mounts and possibly other cases. --- lib/Twig/Environment.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; } -- 1.7.2.5