From: Jerome Jutteau Date: Sat, 5 Dec 2020 10:53:40 +0000 (+0100) Subject: [TASK] centralize error reporting config X-Git-Tag: 4.3.0~18 X-Git-Url: https://git.p6c8.net/jirafeau_project.git/commitdiff_plain/d598ed64ed220d9bc3113add823c93310c68ad38?ds=sidebyside [TASK] centralize error reporting config Signed-off-by: Jerome Jutteau --- diff --git a/admin.php b/admin.php index e5ba8bd..bcc291b 100644 --- a/admin.php +++ b/admin.php @@ -110,8 +110,6 @@ if (php_sapi_name() == "cli") { * Be sure PHP's safe mode is off. */ @set_time_limit(0); - /* Remove errors. */ - @error_reporting(0); /* Show admin interface if not downloading a file. */ if (!(isset($_POST['action']) && strcmp($_POST['action'], 'download') == 0)) { diff --git a/f.php b/f.php index 8f7aa37..f6fe6fd 100644 --- a/f.php +++ b/f.php @@ -32,8 +32,6 @@ if (!isset($_GET['h']) || empty($_GET['h'])) { * Be sure PHP's safe mode is off. */ @set_time_limit(0); -/* Remove errors. */ -@error_reporting(0); $link_name = $_GET['h']; diff --git a/lib/settings.php b/lib/settings.php index 621af0c..fa9efaa 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -30,11 +30,15 @@ if (file_exists(JIRAFEAU_ROOT . 'lib/config.local.php')) { } // Setup debug mode -error_reporting(0); if ($cfg['debug'] === true) { - error_reporting(E_ALL); + @error_reporting(E_ALL); } +else +{ + @error_reporting(0); +} + // Set constants diff --git a/script.php b/script.php index cd7cec6..3f7d2f7 100644 --- a/script.php +++ b/script.php @@ -32,8 +32,6 @@ require(JIRAFEAU_ROOT . 'lib/lang.php'); * Be sure PHP's safe mode is off. */ @set_time_limit(0); -/* Remove errors. */ -@error_reporting(0); if ($_SERVER['REQUEST_METHOD'] == "GET" && count($_GET) == 0) { require(JIRAFEAU_ROOT . 'lib/template/header.php');