diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2014-04-05 19:48:52 +0200 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2014-04-19 16:58:38 +0200 |
commit | 7cccd59cdc0f89d13b57c1aacad72dc5687dd453 (patch) | |
tree | 2a16fe827dc099848ab7f7e117cdf785a462c3a1 /phpBB | |
parent | 0e88f0db4ad728ed071f42301ee7196c8bf1c2ab (diff) | |
download | forums-7cccd59cdc0f89d13b57c1aacad72dc5687dd453.tar forums-7cccd59cdc0f89d13b57c1aacad72dc5687dd453.tar.gz forums-7cccd59cdc0f89d13b57c1aacad72dc5687dd453.tar.bz2 forums-7cccd59cdc0f89d13b57c1aacad72dc5687dd453.tar.xz forums-7cccd59cdc0f89d13b57c1aacad72dc5687dd453.zip |
[ticket/12193] Fix broken HTML if SQL error occurs during migration
PHPBB3-12193
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/functions.php | 10 | ||||
-rw-r--r-- | phpBB/install/database_update.php | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 8c29bc7171..ef17076def 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3849,6 +3849,16 @@ function msg_handler($errno, $msg_text, $errfile, $errline) if (defined('IN_INSTALL') || defined('DEBUG') || isset($auth) && $auth->acl_get('a_')) { $msg_text = $log_text; + + // If this is defined there already was some output + // So let's not break it + if (defined('IN_DB_UPDATE')) + { + echo '<div class="errorbox">' . $msg_text . '</div>'; + + $db->sql_return_on_error(true); + phpbb_end_update($cache, $config); + } } if ((defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db)) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index bad51e2fe3..6c9eeb6a75 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -169,6 +169,8 @@ header('Content-type: text/html; charset=UTF-8'); <?php +define('IN_DB_UPDATE', true); + /** * @todo firebird/mysql update? */ |