mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 03:04:09 +02:00
Merge pull request #6350 from rxu/ticket/16688
[ticket/16688] Fix PHP fatal errors on installing extensions via catalog
This commit is contained in:
@@ -152,7 +152,9 @@ class installer
|
||||
{
|
||||
if (!$io)
|
||||
{
|
||||
$this->restore_cwd();
|
||||
$io = new null_io();
|
||||
$this->move_to_root();
|
||||
}
|
||||
|
||||
$this->generate_ext_json_file($packages);
|
||||
@@ -184,6 +186,7 @@ class installer
|
||||
catch (\Exception $e)
|
||||
{
|
||||
$this->restore_ext_json_file();
|
||||
$this->restore_cwd();
|
||||
|
||||
throw new runtime_exception('COMPOSER_CANNOT_INSTALL', [], $e);
|
||||
}
|
||||
@@ -191,6 +194,7 @@ class installer
|
||||
if ($result !== 0)
|
||||
{
|
||||
$this->restore_ext_json_file();
|
||||
$this->restore_cwd();
|
||||
|
||||
throw new runtime_exception($io->get_composer_error(), []);
|
||||
}
|
||||
@@ -587,6 +591,7 @@ class installer
|
||||
$repositories[] = [
|
||||
'type' => 'composer',
|
||||
'url' => $repository,
|
||||
'canonical' => $this->packagist ? false : true,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -89,7 +89,7 @@ class manager implements manager_interface
|
||||
$managed_packages = array_merge($this->get_all_managed_packages(), $packages);
|
||||
ksort($managed_packages);
|
||||
|
||||
$this->installer->install($managed_packages, array_keys($packages), $io);
|
||||
$this->installer->install($managed_packages, [], $io);
|
||||
|
||||
$this->post_install($packages, $io);
|
||||
|
||||
|
Reference in New Issue
Block a user