diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2016-08-21 19:04:17 +0200 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2016-08-21 19:04:17 +0200 |
| commit | f814840568c004f2de3df828e5b6a7f95de99035 (patch) | |
| tree | 0398f619c6bc00297f9c41e97f3ca5443c383a59 | |
| parent | 43762950bc5e5552e25e7946a58ef2fde733a28b (diff) | |
| parent | 0eb44fc93461e1a354da553863ac272e303fdc4b (diff) | |
| download | forums-f814840568c004f2de3df828e5b6a7f95de99035.tar forums-f814840568c004f2de3df828e5b6a7f95de99035.tar.gz forums-f814840568c004f2de3df828e5b6a7f95de99035.tar.bz2 forums-f814840568c004f2de3df828e5b6a7f95de99035.tar.xz forums-f814840568c004f2de3df828e5b6a7f95de99035.zip | |
Merge pull request #4416 from Elsensee/ticket/14746
[ticket/14746] Make msg_handler in installer independent from container
| -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; |
