diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-06-27 13:21:45 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-06-27 13:21:45 +0200 |
commit | 12f7cb87679453fa96c796df857b7e7193d4ee09 (patch) | |
tree | afdc10250a5877d97b5b89a97e2e052eaa97a9b9 /lib/helper.php | |
parent | 420d23a875c19ba04d679db826bcf9bd2ad9d6c2 (diff) | |
download | nextcloud-server-12f7cb87679453fa96c796df857b7e7193d4ee09.tar.gz nextcloud-server-12f7cb87679453fa96c796df857b7e7193d4ee09.zip |
fix running tests from cli
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php index 37914b73e17..6ab55f27618 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -75,6 +75,9 @@ class OC_Helper { * reverse proxies */ public static function serverHost() { + if(OC::$CLI){ + return 'localhost'; + } if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) { if (strpos($_SERVER['HTTP_X_FORWARDED_HOST'], ",") !== false) { $host = trim(array_pop(explode(",", $_SERVER['HTTP_X_FORWARDED_HOST']))); |