From 6404ed2502ee4a9db634b942842d334f042de62a Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 19 Dec 2021 16:57:40 +0700 Subject: [PATCH] [ticket/16688] Do not restore current working dir before json file restoring PHPBB3-16688 --- phpBB/phpbb/composer/installer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php index f436587fb5..9244644788 100644 --- a/phpBB/phpbb/composer/installer.php +++ b/phpBB/phpbb/composer/installer.php @@ -185,16 +185,16 @@ class installer } catch (\Exception $e) { - $this->restore_cwd(); $this->restore_ext_json_file(); + $this->restore_cwd(); throw new runtime_exception('COMPOSER_CANNOT_INSTALL', [], $e); } if ($result !== 0) { - $this->restore_cwd(); $this->restore_ext_json_file(); + $this->restore_cwd(); throw new runtime_exception($io->get_composer_error(), []); }