diff --git a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php index 017d5506a3..47588f76c4 100644 --- a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php +++ b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php @@ -182,7 +182,7 @@ class ClassCollectionLoader { $tmpFile = tempnam(dirname($file), basename($file)); if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) { - chmod($file, 0666 & ~umask()); + @chmod($file, 0666 & ~umask()); return; } diff --git a/src/Symfony/Component/Config/ConfigCache.php b/src/Symfony/Component/Config/ConfigCache.php index 8fb67d1496..421cb7cc43 100644 --- a/src/Symfony/Component/Config/ConfigCache.php +++ b/src/Symfony/Component/Config/ConfigCache.php @@ -101,7 +101,7 @@ class ConfigCache $tmpFile = tempnam(dirname($this->file), basename($this->file)); if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $this->file)) { - chmod($this->file, 0666 & ~umask()); + @chmod($this->file, 0666 & ~umask()); } else { throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $this->file)); } @@ -110,7 +110,7 @@ class ConfigCache $file = $this->file.'.meta'; $tmpFile = tempnam(dirname($file), basename($file)); if (false !== @file_put_contents($tmpFile, serialize($metadata)) && @rename($tmpFile, $file)) { - chmod($file, 0666 & ~umask()); + @chmod($file, 0666 & ~umask()); } } } diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index a12f958434..542caeccd5 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -112,7 +112,7 @@ class Filesystem public function chmod($files, $mode, $umask = 0000) { foreach ($this->toIterator($files) as $file) { - chmod($file, $mode & ~$umask); + @chmod($file, $mode & ~$umask); } } diff --git a/src/Symfony/Component/HttpFoundation/File/File.php b/src/Symfony/Component/HttpFoundation/File/File.php index 20a80cafd7..d8ab4ac4fc 100644 --- a/src/Symfony/Component/HttpFoundation/File/File.php +++ b/src/Symfony/Component/HttpFoundation/File/File.php @@ -122,7 +122,7 @@ class File extends \SplFileInfo throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, strip_tags($error['message']))); } - chmod($target, 0666 & ~umask()); + @chmod($target, 0666 & ~umask()); return new File($target); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php index 2990c210ff..7bf10a297e 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php @@ -84,7 +84,7 @@ class MimeTypeTest extends \PHPUnit_Framework_TestCase $path = __DIR__.'/../Fixtures/to_delete'; touch($path); - chmod($path, 0333); + @chmod($path, 0333); if (get_current_user() != 'root' && substr(sprintf('%o', fileperms($path)), -4) == '0333') { $this->setExpectedException('Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException'); @@ -98,7 +98,7 @@ class MimeTypeTest extends \PHPUnit_Framework_TestCase { $path = __DIR__.'/../Fixtures/to_delete'; if (file_exists($path)) { - chmod($path, 0666); + @chmod($path, 0666); @unlink($path); } } diff --git a/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php b/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php index 2406c65a6d..948b3ffd14 100644 --- a/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php +++ b/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php @@ -22,7 +22,7 @@ abstract class CacheWarmer implements CacheWarmerInterface { $tmpFile = tempnam(dirname($file), basename($file)); if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) { - chmod($file, 0666 & ~umask()); + @chmod($file, 0666 & ~umask()); return; } diff --git a/src/Symfony/Component/HttpKernel/HttpCache/Store.php b/src/Symfony/Component/HttpKernel/HttpCache/Store.php index 32112e1431..0eae26270b 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/Store.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/Store.php @@ -332,7 +332,7 @@ class Store implements StoreInterface return false; } - chmod($path, 0666 & ~umask()); + @chmod($path, 0666 & ~umask()); } public function getPath($key)