aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorMate Bartus <mate.bartus@gmail.com>2015-08-17 18:38:07 +0200
committerMate Bartus <mate.bartus@gmail.com>2015-08-17 18:38:07 +0200
commitf4f0ff0eec78c85b4ec2962a0de06d9aa2bd37a5 (patch)
tree6961bbf6d9def4926fd58027138ec5860b7d827d /phpBB/phpbb
parentdce1c5d4c923f852a1eae8cb14c307b0d452549d (diff)
downloadforums-f4f0ff0eec78c85b4ec2962a0de06d9aa2bd37a5.tar
forums-f4f0ff0eec78c85b4ec2962a0de06d9aa2bd37a5.tar.gz
forums-f4f0ff0eec78c85b4ec2962a0de06d9aa2bd37a5.tar.bz2
forums-f4f0ff0eec78c85b4ec2962a0de06d9aa2bd37a5.tar.xz
forums-f4f0ff0eec78c85b4ec2962a0de06d9aa2bd37a5.zip
[ticket/14097] Improve error and failure handling in the installer
PHPBB3-14097
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/install/installer.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/phpbb/install/installer.php b/phpBB/phpbb/install/installer.php
index cb4ddb8783..78a0de0241 100644
--- a/phpBB/phpbb/install/installer.php
+++ b/phpBB/phpbb/install/installer.php
@@ -92,7 +92,8 @@ class installer
$module_found = false;
// Variable used to check if the install process have been finished
- $install_finished = false;
+ $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();
}