Commit c6b6f62f authored by Carsten  Rose's avatar Carsten Rose
Browse files

Client.php: missing REMOTE_ADDR in phpUnit environment.

parent fd65da46
......@@ -40,6 +40,11 @@ class Client {
$server = Sanitize::htmlentitiesArr($_SERVER); // $_SERVER values might be compromised.
}
// Necessary for phpUnit Tests
if (!isset($server[CLIENT_REMOTE_ADDRESS])) {
$server[CLIENT_REMOTE_ADDRESS] = '0.0.0.0';
}
$arr = array_merge($get, $post, $cookie, $server);
return Sanitize::normalize($arr);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment