From 1f76aa65f3ac939d64834ad6fefc8d8986cd7f10 Mon Sep 17 00:00:00 2001 From: Patrick Webster Date: Sat, 24 Apr 2021 12:39:27 -0500 Subject: [PATCH 1/2] [ticket/16766] Show long error messages during install/update PHPBB3-16766 --- phpBB/install/startup.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/phpBB/install/startup.php b/phpBB/install/startup.php index 007b20da35..02d5038836 100644 --- a/phpBB/install/startup.php +++ b/phpBB/install/startup.php @@ -49,13 +49,19 @@ function phpbb_include_updated($path, $phpbb_root_path, $optional = false) function installer_msg_handler($errno, $msg_text, $errfile, $errline) { - global $phpbb_installer_container; + global $phpbb_installer_container, $msg_long_text; if (error_reporting() == 0) { return true; } + // If the message handler is stripping text, fallback to the long version if available + if (isset($msg_long_text) && $msg_long_text && !$msg_text) + { + $msg_text = $msg_long_text; + } + switch ($errno) { case E_NOTICE: From 31fc85153e9d96132ba03f9d08a11a891d892c00 Mon Sep 17 00:00:00 2001 From: Patrick Webster Date: Tue, 27 Apr 2021 18:00:08 -0500 Subject: [PATCH 2/2] [ticket/16766] Restructure conditional PHPBB3-16766 --- phpBB/install/startup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/startup.php b/phpBB/install/startup.php index 02d5038836..f3312d227d 100644 --- a/phpBB/install/startup.php +++ b/phpBB/install/startup.php @@ -57,7 +57,7 @@ function installer_msg_handler($errno, $msg_text, $errfile, $errline) } // If the message handler is stripping text, fallback to the long version if available - if (isset($msg_long_text) && $msg_long_text && !$msg_text) + if (!$msg_text && !empty($msg_long_text)) { $msg_text = $msg_long_text; }