Commit Diff


commit - 18e4ff26b03a3c644b9a049fde78f1b1b366086c
commit + e1b16e250e7f229a310b569a30bad99e7617b0e1
blob - c9c83978f5f0bb1d8df10e507e3cbb0317ba10a3
blob + 0a6ccad33af4c08701557071950c2c0400b8c7f8
--- config.inc.php.sample
+++ config.inc.php.sample
@@ -12,6 +12,10 @@ if (preg_match("/config.inc.php/", $_SERVER['SCRIPT_NA
 	exit;
 }
 
+// Debug mode
+// Enables PHP error output
+$CONF['debug'] = 'true';
+
 // Language config
 // Language files are located in './languages'.
 $CONF['default_language'] = 'en';
blob - 24c6ce2e0323cbcd98cf008f884f4ba30e6ba752
blob + 6c9036f8a16227900dcd99c605be43801ec89f63
--- functions.inc.php
+++ functions.inc.php
@@ -7,17 +7,25 @@
 //
 // File: functions.inc.php
 //
-ini_set('display_errors', 1);
-ini_set('display_startup_errors', 1);
-error_reporting(E_ALL);
-mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
-
 if(preg_match("/functions.inc.php/", $_SERVER['SCRIPT_NAME'])) {
 	header("Location: login.php");
 	exit;
 }
 
 $version = "1.0.0";
+
+//
+// Check of debug is enabled or not
+//
+if ($CONF['debug'] == 'true') {
+	ini_set('display_errors', 1);
+	ini_set('display_startup_errors', 1);
+	error_reporting(E_ALL);
+	mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
+} else {
+	ini_set('display_errors', 0);
+	ini_set('display_startup_errors', 0);		
+}
 
 //
 // check_session