]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use [0] instead of current as HHVM might have problems with that
authorLukas Reschke <lukas@owncloud.com>
Tue, 24 Feb 2015 12:37:34 +0000 (13:37 +0100)
committerLukas Reschke <lukas@owncloud.com>
Tue, 24 Feb 2015 12:37:34 +0000 (13:37 +0100)
lib/private/appframework/http/request.php

index f415d6faf2eecd4a186f793270a7656df15fc28a..7cbeaa0480e3f15c9fad04ece92af6e19b9b59a8 100644 (file)
@@ -493,7 +493,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
                if (isset($this->server['HTTP_X_FORWARDED_PROTO'])) {
                        if (strpos($this->server['HTTP_X_FORWARDED_PROTO'], ',') !== false) {
                                $parts = explode(',', $this->server['HTTP_X_FORWARDED_PROTO']);
-                               $proto = strtolower(trim(current($parts)));
+                               $proto = strtolower(trim($parts[0]));
                        } else {
                                $proto = strtolower($this->server['HTTP_X_FORWARDED_PROTO']);
                        }