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()));