1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 15:16:16 +02:00

[ticket/12193] Fix broken HTML if SQL error occurs during migration

PHPBB3-12193
This commit is contained in:
Oliver Schramm 2014-04-05 19:48:52 +02:00
parent 0e88f0db4a
commit 7cccd59cdc
2 changed files with 12 additions and 0 deletions

View File

@ -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))

View File

@ -169,6 +169,8 @@ header('Content-type: text/html; charset=UTF-8');
<?php
define('IN_DB_UPDATE', true);
/**
* @todo firebird/mysql update?
*/