diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2016-08-19 19:23:52 +0200 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2016-08-19 19:23:52 +0200 |
commit | 0eb44fc93461e1a354da553863ac272e303fdc4b (patch) | |
tree | 116a31b40762f152befec9a72aefbd711ecd44f5 /phpBB | |
parent | 723d9d8e4c9f397eab7af77e6e6bd851354a9dcd (diff) | |
download | forums-0eb44fc93461e1a354da553863ac272e303fdc4b.tar forums-0eb44fc93461e1a354da553863ac272e303fdc4b.tar.gz forums-0eb44fc93461e1a354da553863ac272e303fdc4b.tar.bz2 forums-0eb44fc93461e1a354da553863ac272e303fdc4b.tar.xz forums-0eb44fc93461e1a354da553863ac272e303fdc4b.zip |
[ticket/14746] Make msg_handler in installer independent from container
PHPBB3-14746
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/install/startup.php | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/phpBB/install/startup.php b/phpBB/install/startup.php index 711768f9ac..9a4f9bfe39 100644 --- a/phpBB/install/startup.php +++ b/phpBB/install/startup.php @@ -62,18 +62,27 @@ function installer_msg_handler($errno, $msg_text, $errfile, $errline) case E_WARNING: case E_USER_WARNING: case E_USER_NOTICE: - $msg = '[phpBB debug] "' . $msg_text . '" in file ' . $errfile . ' on line ' . $errline; + $msg = '[phpBB Debug] "' . $msg_text . '" in file ' . $errfile . ' on line ' . $errline; - try + if (!empty($phpbb_installer_container)) { - /** @var \phpbb\install\helper\iohandler\iohandler_interface $iohandler */ - $iohandler = $phpbb_installer_container->get('installer.helper.iohandler'); - $iohandler->add_warning_message($msg); + try + { + /** @var \phpbb\install\helper\iohandler\iohandler_interface $iohandler */ + $iohandler = $phpbb_installer_container->get('installer.helper.iohandler'); + $iohandler->add_warning_message($msg); + } + catch (\phpbb\install\helper\iohandler\exception\iohandler_not_implemented_exception $e) + { + print($msg); + } } - catch (\phpbb\install\helper\iohandler\exception\iohandler_not_implemented_exception $e) + else { - print ($msg); + print($msg); } + + return; break; case E_USER_ERROR: $msg = '<b>General Error:</b><br />' . $msg_text . '<br /> in file ' . $errfile . ' on line ' . $errline; |