From 360cb4ac2af350c8b96b2fd56b67ef9d5589836a Mon Sep 17 00:00:00 2001 From: Metod Date: Tue, 17 May 2016 12:06:27 +0100 Subject: [PATCH] Fix for a fatal error when system temp dir is not available --- src/Composer/Console/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 2523ed4a7..f3743c2f6 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -188,7 +188,7 @@ class Application extends BaseApplication } // Check system temp folder for usability as it can cause weird runtime issues otherwise - Silencer::call(function() { + Silencer::call(function () use ($io) { $tempfile = sys_get_temp_dir() . '/temp-' . md5(microtime()); if (!(file_put_contents($tempfile, __FILE__) && (file_get_contents($tempfile) == __FILE__) && unlink($tempfile) && !file_exists($tempfile))) { $io->writeError(sprintf('PHP temp directory (%s) does not exist or is not writable to Composer. Set sys_temp_dir in your php.ini', sys_get_temp_dir()));