"MDL-16954, get rid of remote_addr notice on cli, set ip = 0.0.0.0 in mdl_log table when accessed from cli"
This commit is contained in:
+5
-1
@@ -7511,7 +7511,11 @@ function getremoteaddr() {
|
||||
return cleanremoteaddr($_SERVER['HTTP_X_FORWARDED_FOR']);
|
||||
}
|
||||
}
|
||||
return cleanremoteaddr($_SERVER['REMOTE_ADDR']);
|
||||
if (!empty($_SERVER['REMOTE_ADDR'])) {
|
||||
return cleanremoteaddr($_SERVER['REMOTE_ADDR']);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user