From 2665f1b2825d8e62e253dec232d5f55ad9de53e4 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 28 Jul 2021 14:33:47 +0200 Subject: [PATCH] Fix private property access, fixes #10022 --- src/Composer/Console/Application.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 7a298756e..d60a3bb86 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -419,7 +419,8 @@ class Application extends BaseApplication } catch (\InvalidArgumentException $e) { if ($required) { $this->io->writeError($e->getMessage()); - if ($this->catchExceptions) { + // TODO composer 2.3 simplify to $this->areExceptionsCaught() + if (!method_exists($this, 'areExceptionsCaught') || $this->areExceptionsCaught()) { exit(1); } throw $e;