diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-08-15 14:15:27 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-08-15 14:15:27 +0200 |
commit | a82cd1ff67b8b0eba7fb4f4d57d1a94e98417ebf (patch) | |
tree | be6fdbd027dc638240cdd45ee2183db4eb8c7500 | |
parent | 5bb477285863c09af8af3c61e705aed6b2c53901 (diff) | |
download | nextcloud-server-a82cd1ff67b8b0eba7fb4f4d57d1a94e98417ebf.tar.gz nextcloud-server-a82cd1ff67b8b0eba7fb4f4d57d1a94e98417ebf.zip |
Fix unit test
-rw-r--r-- | lib/private/user/manager.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/user/manager.php b/lib/private/user/manager.php index a897545e550..a54755e71c5 100644 --- a/lib/private/user/manager.php +++ b/lib/private/user/manager.php @@ -165,7 +165,10 @@ class Manager extends PublicEmitter implements IUserManager { } } - \OC::$server->getLogger()->warning('Login failed: \''. $loginname .'\' (Remote IP: \''. $_SERVER['REMOTE_ADDR'] .'\', X-Forwarded-For: \''. $_SERVER['HTTP_X_FORWARDED_FOR'] .'\')', array('app' => 'core')); + $remoteAddr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; + $forwardedFor = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : ''; + + \OC::$server->getLogger()->warning('Login failed: \''. $loginname .'\' (Remote IP: \''. $remoteAddr .'\', X-Forwarded-For: \''. $forwardedFor .'\')', array('app' => 'core')); return false; } |