aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/startup.php
diff options
context:
space:
mode:
authorMate Bartus <mate.bartus@gmail.com>2015-12-01 18:50:20 +0100
committerMate Bartus <mate.bartus@gmail.com>2015-12-01 18:50:20 +0100
commitd1fc8f79e749cf48b2890335238c9867dc9abc05 (patch)
tree14d81cfb6a9912f3d80204752ebd32ef7e9ec2d2 /phpBB/install/startup.php
parent151535fdaf52e2847074a861252d4f24850d2949 (diff)
downloadforums-d1fc8f79e749cf48b2890335238c9867dc9abc05.tar
forums-d1fc8f79e749cf48b2890335238c9867dc9abc05.tar.gz
forums-d1fc8f79e749cf48b2890335238c9867dc9abc05.tar.bz2
forums-d1fc8f79e749cf48b2890335238c9867dc9abc05.tar.xz
forums-d1fc8f79e749cf48b2890335238c9867dc9abc05.zip
[ticket/14311] Use the iohandler for notices and warnings if possible
PHPBB3-14311
Diffstat (limited to 'phpBB/install/startup.php')
-rw-r--r--phpBB/install/startup.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/phpBB/install/startup.php b/phpBB/install/startup.php
index ecf42a5ad0..0d3e01efaa 100644
--- a/phpBB/install/startup.php
+++ b/phpBB/install/startup.php
@@ -49,6 +49,8 @@ function phpbb_include_updated($path, $phpbb_root_path, $optional = false)
function installer_msg_handler($errno, $msg_text, $errfile, $errline)
{
+ global $phpbb_installer_container;
+
switch ($errno)
{
case E_NOTICE:
@@ -56,7 +58,17 @@ function installer_msg_handler($errno, $msg_text, $errfile, $errline)
case E_USER_WARNING:
case E_USER_NOTICE:
$msg = '[phpBB debug] "' . $msg_text . '" in file ' . $errfile . ' on line ' . $errline;
- throw new \phpbb\exception\runtime_exception($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);
+ }
break;
case E_USER_ERROR:
$msg = '<b>General Error:</b><br />' . $msg_text . '<br /> in file ' . $errfile . ' on line ' . $errline;