Fix Page Header usage

This commit is contained in:
Philipp Holzer 2021-11-22 00:13:02 +01:00
parent 6a9fff5100
commit e4000155f3
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432

View file

@ -381,7 +381,10 @@ class Page implements ArrayAccess
foreach ($response->getHeaders() as $key => $header) {
if (is_array($header)) {
$header_str = implode(',', $header);
} else {
$header_str = $header;
}
if (empty($key)) {
header($header_str);
} else {
@ -456,10 +459,16 @@ class Page implements ArrayAccess
}
foreach ($response->getHeaders() as $key => $header) {
if (empty($key)) {
header($header);
if (is_array($header)) {
$header_str = implode(',', $header);
} else {
header("$key: $header");
$header_str = $header;
}
if (empty($key)) {
header($header_str);
} else {
header("$key: $header_str");
}
}