Skip to content

Commit 34f51d9

Browse files
committed
switched from strtok() to explode()
1 parent 77343f3 commit 34f51d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/base_facebook.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,9 @@ protected function getUrl($name, $path='', $params=array()) {
11561156

11571157
protected function getHttpHost() {
11581158
if ($this->trustForwarded && isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
1159-
return strtok($_SERVER['HTTP_X_FORWARDED_HOST'], ',');
1159+
$forwardProxies = explode(',', $_SERVER['HTTP_X_FORWARDED_HOST']);
1160+
$forwardProxies = array_filter($forwarders);
1161+
return current($forwardProxies);
11601162
}
11611163
return $_SERVER['HTTP_HOST'];
11621164
}

0 commit comments

Comments
 (0)