mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/14097] Improve error and failure handling in the installer
PHPBB3-14097
This commit is contained in:
parent
dce1c5d4c9
commit
f4f0ff0eec
1 changed files with 10 additions and 2 deletions
|
@ -93,6 +93,7 @@ class installer
|
|||
|
||||
// Variable used to check if the install process have been finished
|
||||
$install_finished = false;
|
||||
$fail_cleanup = false;
|
||||
|
||||
// We are installing something, so the introduction stage can go now...
|
||||
$this->install_config->set_finished_navigation_stage(array('install', 0, 'introduction'));
|
||||
|
@ -209,6 +210,13 @@ class installer
|
|||
{
|
||||
// Do nothing
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
// Most likely there were a PHP failure, so let's die like a gentleman
|
||||
$this->iohandler->add_error_message($e->getMessage());
|
||||
$this->iohandler->send_response();
|
||||
$fail_cleanup = true;
|
||||
}
|
||||
|
||||
if ($install_finished)
|
||||
{
|
||||
|
@ -223,7 +231,7 @@ class installer
|
|||
// Save install progress
|
||||
try
|
||||
{
|
||||
if ($install_finished)
|
||||
if ($install_finished || $fail_cleanup)
|
||||
{
|
||||
$this->install_config->clean_up_config_file();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue