From e8537afd60d2c5d37e48a99aca9e72394cc044dd Mon Sep 17 00:00:00 2001 From: Joas Schilling <nickvergessen@gmx.de> Date: Mon, 7 Jul 2014 14:39:06 +0200 Subject: Only overwrite serverHost when in unit tests The intention of the original commit 12f7cb87679453fa96c796df857b7e7193d4ee09 was to fix tests. But cron should always return a valid host not localhost. --- lib/private/request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/request.php b/lib/private/request.php index 619eae3e9b5..5fd5b3a7197 100755 --- a/lib/private/request.php +++ b/lib/private/request.php @@ -95,7 +95,7 @@ class OC_Request { * reverse proxies */ public static function serverHost() { - if(OC::$CLI) { + if (OC::$CLI && defined('PHPUNIT_RUN')) { return 'localhost'; } -- cgit v1.2.3