aboutsummaryrefslogtreecommitdiff
path: root/h-source/Library/ErrorReporting.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Library/ErrorReporting.php')
-rw-r--r--h-source/Library/ErrorReporting.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/h-source/Library/ErrorReporting.php b/h-source/Library/ErrorReporting.php
new file mode 100644
index 0000000..bc541bc
--- /dev/null
+++ b/h-source/Library/ErrorReporting.php
@@ -0,0 +1,25 @@
+<?php
+
+//function to set the error reporting parameters
+
+function ErrorReporting() {
+ if (RUNTIME_CONFIGURATION === true)
+ {
+ error_reporting(ERROR_REPORTING_DIRECTIVE);
+ if (DISPLAY_ERRORS === 'On') {
+ ini_set('display_errors','On');
+ } else {
+ ini_set('display_errors','Off');
+ }
+
+ if (ERROR_REPORTING_FILE === true)
+ {
+ if (LOG_ERROR_FILE === 'default')
+ {
+ ini_set('error_log',ROOT.DS.'Logs/Errors.log');
+ } else {
+ ini_set('error_log',LOG_ERROR_FILE);
+ }
+ }
+ }
+}