fix: only variables should be passed by reference
This commit is contained in:
@@ -25,9 +25,11 @@ class Logger {
|
||||
$ip = '(n-a)';
|
||||
|
||||
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
$ip = array_shift(
|
||||
array_map('trim', explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||
$arr = array_map(
|
||||
'trim',
|
||||
explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])
|
||||
);
|
||||
$ip = array_shift($arr);
|
||||
} else if (isset($_SERVER['REMOTE_ADDR'])) {
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user