diff --git a/composer.json b/composer.json index a11c140..541be5f 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "ext-json": "*", "ext-openssl": "*", "ext-curl": "*", - "guzzlehttp/guzzle": "^7.9" + "guzzlehttp/guzzle": "^8.0" }, "license": "MIT", "autoload": { diff --git a/src/HelloRequest/HelloRequest.php b/src/HelloRequest/HelloRequest.php index 856baf3..779e862 100644 --- a/src/HelloRequest/HelloRequest.php +++ b/src/HelloRequest/HelloRequest.php @@ -76,7 +76,10 @@ public function fetchHeader(string $key, $default = null) private function getAllHeaders(): array { if (function_exists('getallheaders')) { - return getallheaders(); + $headers = getallheaders(); + if ($headers !== false) { + return $headers; + } } $headers = [];