summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/functions.php')
-rw-r--r--inc/functions.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 7d12ccfb..dcd68385 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -165,7 +165,14 @@
}
function _syslog($priority, $message) {
- syslog($priority, $message . ' - client: ' . $_SERVER['REMOTE_ADDR'] . ', request: "' . $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI'] . '"');
+ if( isset($_SERVER['REMOTE_ADDR']) &&
+ isset($_SERVER['REQUEST_METHOD']) &&
+ isset($_SERVER['REQUEST_URI'])) {
+ // CGI
+ syslog($priority, $message . ' - client: ' . $_SERVER['REMOTE_ADDR'] . ', request: "' . $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI'] . '"');
+ } else {
+ syslog($priority, $message);
+ }
}
function loadThemeConfig($_theme) {