From 206c3c52e02ad75abb751faf1d116e92a0866625 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 15 May 2016 12:04:41 +0100 Subject: [PATCH] Remove the error handler at the end of a run, fixes #5340 --- src/Composer/Console/Application.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 9c153542e..2523ed4a7 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -228,9 +228,12 @@ class Application extends BaseApplication $io->writeError('Memory usage: '.round(memory_get_usage() / 1024 / 1024, 2).'MB (peak: '.round(memory_get_peak_usage() / 1024 / 1024, 2).'MB), time: '.round(microtime(true) - $startTime, 2).'s'); } + restore_error_handler(); + return $result; } catch (\Exception $e) { $this->hintCommonErrors($e); + restore_error_handler(); throw $e; } }