From 5e8733a9f6c8bde6c7320af53976c42059b9ec09 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 15 Aug 2014 14:15:27 +0200 Subject: [PATCH] Fix unit test --- lib/private/user/manager.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.39.5