[TASK] centralize error reporting config

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
This commit is contained in:
Jerome Jutteau 2020-12-05 11:53:40 +01:00
parent c3c7c86917
commit d598ed64ed
4 changed files with 6 additions and 8 deletions

View File

@ -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)) {

2
f.php
View File

@ -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'];

View File

@ -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

View File

@ -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');