[ticket/16043] Check if not null before getting anything from the container

This is only happening when there is basicly an error during
init of the container.

PHPBB3-16043
This commit is contained in:
Paul Sohier 2019-05-03 22:45:53 +02:00 committed by Marc Alexander
parent 6105260a8e
commit 465d0b1a4c
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -3395,7 +3395,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
$log_text .= '<br /><br />BACKTRACE<br />' . $backtrace;
}
if (defined('IN_INSTALL') || $phpbb_container->getParameter('debug.show_errors') || isset($auth) && $auth->acl_get('a_'))
if (defined('IN_INSTALL') || ($phpbb_container != null && $phpbb_container->getParameter('debug.show_errors')) || isset($auth) && $auth->acl_get('a_'))
{
$msg_text = $log_text;