aboutsummaryrefslogtreecommitdiff
path: root/constants.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-03-04 21:21:38 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-03-04 21:21:38 +0100
commit999d1b8c035f4de31026198dad93f485392df8d4 (patch)
tree0748a88f92755b90f235b731489d64233e60f5dc /constants.php
parent1bdc3837de6f9b2555220578bb3584651da9ab82 (diff)
Use getenv instead of $_SERVER for environment variables
getenv() is the proper way, and $_SERVER was not working on some configurations. Improvement of https://github.com/FreshRSS/FreshRSS/pull/2213
Diffstat (limited to 'constants.php')
-rw-r--r--constants.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/constants.php b/constants.php
index 2072e5ea1..dacbb11aa 100644
--- a/constants.php
+++ b/constants.php
@@ -33,7 +33,7 @@ safe_define('FRESHRSS_USERAGENT', 'FreshRSS/' . FRESHRSS_VERSION . ' (' . PHP_OS
safe_define('PHP_COMPRESSION', false);
// For cases when syslog is not available
-safe_define('COPY_SYSLOG_TO_STDERR', isset($_SERVER['COPY_SYSLOG_TO_STDERR']) ? filter_var($_SERVER['COPY_SYSLOG_TO_STDERR'], FILTER_VALIDATE_BOOLEAN) : false);
+safe_define('COPY_SYSLOG_TO_STDERR', filter_var(getenv('COPY_SYSLOG_TO_STDERR'), FILTER_VALIDATE_BOOLEAN));
// Maximum log file size in Bytes, before it will be divided by two
safe_define('MAX_LOG_SIZE', 1048576);