From f5fa2526be4dc701794120289448474bdc47d804 Mon Sep 17 00:00:00 2001 From: balki <3070606-balki@users.noreply.gitlab.com> Date: Mon, 20 Dec 2021 16:21:38 -0500 Subject: [PATCH] Add option to turn off display_errors --- include/common.inc.php | 5 ++++- include/config_default.inc.php | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/common.inc.php b/include/common.inc.php index a52381ed2..cdb577fed 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -87,7 +87,10 @@ include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php if(isset($conf['show_php_errors']) && !empty($conf['show_php_errors'])) { @ini_set('error_reporting', $conf['show_php_errors']); - @ini_set('display_errors', true); + if($conf['show_php_errors_on_frontend']) + { + @ini_set('display_errors', true); + } } if ($conf['session_gc_probability'] > 0) diff --git a/include/config_default.inc.php b/include/config_default.inc.php index f67459e06..b818d7d67 100644 --- a/include/config_default.inc.php +++ b/include/config_default.inc.php @@ -490,6 +490,13 @@ $conf['template_combine_files'] = true; // gives an empty value '' to deactivate $conf['show_php_errors'] = E_ALL; +// This sets the display_errors php option to true, so php errors and warning +// messages are shown in the browser. If this is false, the error messages are +// available in the php log of the server if show_php_errors has any set. +// If the below is turned off in local config and errors are still shown on +// frontend, check for display_errors setting server's php config +$conf['show_php_errors_on_frontend'] = true; + // +-----------------------------------------------------------------------+ // | authentication |