We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 32db64a + bc07098 commit bd42f05Copy full SHA for bd42f05
1 file changed
lib/private/Http/Client/Response.php
@@ -71,7 +71,13 @@ public function getStatusCode(): int {
71
* @return string
72
*/
73
public function getHeader(string $key): string {
74
- return $this->response->getHeader($key)[0];
+ $headers = $this->response->getHeader($key);
75
+
76
+ if (count($headers) === 0) {
77
+ return '';
78
+ }
79
80
+ return $headers[0];
81
}
82
83
/**
0 commit comments