From 27898c4c31cbcacdab50dbc5001b38016a473e00 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 20 Feb 2013 14:51:15 +0100 Subject: [PATCH] Suppress errors from mkdir calls that are checked for failure --- src/Composer/Json/JsonFile.php | 2 +- src/Composer/Util/Filesystem.php | 2 +- tests/Composer/Test/Repository/VcsRepositoryTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Composer/Json/JsonFile.php b/src/Composer/Json/JsonFile.php index 9afb43a55..db8ca7a5f 100755 --- a/src/Composer/Json/JsonFile.php +++ b/src/Composer/Json/JsonFile.php @@ -108,7 +108,7 @@ class JsonFile $dir.' exists and is not a directory.' ); } - if (!mkdir($dir, 0777, true)) { + if (!@mkdir($dir, 0777, true)) { throw new \UnexpectedValueException( $dir.' does not exist and could not be created.' ); diff --git a/src/Composer/Util/Filesystem.php b/src/Composer/Util/Filesystem.php index e14d6af88..b9fa1fff1 100644 --- a/src/Composer/Util/Filesystem.php +++ b/src/Composer/Util/Filesystem.php @@ -108,7 +108,7 @@ class Filesystem $directory.' exists and is not a directory.' ); } - if (!mkdir($directory, 0777, true)) { + if (!@mkdir($directory, 0777, true)) { throw new \RuntimeException( $directory.' does not exist and could not be created.' ); diff --git a/tests/Composer/Test/Repository/VcsRepositoryTest.php b/tests/Composer/Test/Repository/VcsRepositoryTest.php index 2673d10b0..b98be6fc2 100644 --- a/tests/Composer/Test/Repository/VcsRepositoryTest.php +++ b/tests/Composer/Test/Repository/VcsRepositoryTest.php @@ -39,7 +39,7 @@ class VcsRepositoryTest extends \PHPUnit_Framework_TestCase return; } - if (!mkdir(self::$gitRepo) || !chdir(self::$gitRepo)) { + if (!@mkdir(self::$gitRepo) || !@chdir(self::$gitRepo)) { $this->skipped = 'Could not create and move into the temp git repo '.self::$gitRepo; return;