LSlog_handler : fix undefined index errors on CLI context

This commit is contained in:
Benjamin Renard 2020-05-08 13:21:28 +02:00
parent b574300ab3
commit 6db3543ec0

View file

@ -158,8 +158,8 @@ class LSlog_handler {
'logger' => ($logger?$logger:'default'), 'logger' => ($logger?$logger:'default'),
'datetime' => date('Y/m/d H:i:s'), 'datetime' => date('Y/m/d H:i:s'),
'clibinpath' => (isset($argv)?$argv[0]:'unknown bin path'), 'clibinpath' => (isset($argv)?$argv[0]:'unknown bin path'),
'requesturi' => (isset($_SERVER)?$_SERVER['REQUEST_URI']:'unknown request URI'), 'requesturi' => (isset($_SERVER['REQUEST_URI'])?$_SERVER['REQUEST_URI']:'unknown request URI'),
'remoteaddr' => (isset($_SERVER)?$_SERVER['REMOTE_ADDR']:'unknown remote address'), 'remoteaddr' => (isset($_SERVER['REMOTE_ADDR'])?$_SERVER['REMOTE_ADDR']:'unknown remote address'),
'ldapservername' => self :: getLdapServerName(), 'ldapservername' => self :: getLdapServerName(),
'authuser' => self :: getAuthenticatedUserDN(), 'authuser' => self :: getAuthenticatedUserDN(),
) )