]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix unit test
authorLukas Reschke <lukas@owncloud.com>
Fri, 15 Aug 2014 12:15:27 +0000 (14:15 +0200)
committerLukas Reschke <lukas@owncloud.com>
Fri, 15 Aug 2014 14:52:17 +0000 (16:52 +0200)
lib/private/user/manager.php

index a897545e55061cd0be157e2f62a0ea50c9c4b89a..a54755e71c54bcfa90da20e4dc3a31cf563ab3c3 100644 (file)
@@ -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;
        }