diff --git a/composer.json b/composer.json index 9d54abc37..9a0313fce 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "^5.4|^7.0" + "php": "^5.4|^7.0|^8.0" }, "require-dev": { "phpunit/phpunit": "~4.0", diff --git a/src/Facebook/Url/FacebookUrlDetectionHandler.php b/src/Facebook/Url/FacebookUrlDetectionHandler.php index 1d134ddcb..6bac3beab 100644 --- a/src/Facebook/Url/FacebookUrlDetectionHandler.php +++ b/src/Facebook/Url/FacebookUrlDetectionHandler.php @@ -95,6 +95,7 @@ protected function protocolWithActiveSsl($protocol) protected function getHostName() { // Check for proxy first + $header = null; $header = $this->getHeader('X_FORWARDED_HOST'); if ($header && $this->isValidForwardedHost($header)) { $elements = explode(',', $header);