git.cweiske.de
/
noxon-gateway.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3fbfb0
)
fix podcast redirection
author
Christian Weiske
<
[email protected]
>
Sun, 5 Jan 2020 16:13:52 +0000
(17:13 +0100)
committer
Christian Weiske
<
[email protected]
>
Sun, 5 Jan 2020 16:15:49 +0000
(17:15 +0100)
www/deredirect.php
patch
|
blob
|
history
diff --git
a/www/deredirect.php
b/www/deredirect.php
index 5b90e1dfa6449111bf908fc006df5f14ed09f26d..a8c630b0d916ae22a1122aada947d1d61958a7c5 100644
(file)
--- a/
www/deredirect.php
+++ b/
www/deredirect.php
@@
-17,7
+17,10
@@
function getFinalUrl($url)
//get_headers follows redirects automatically
$headers = get_headers($url, 1);
if ($headers !== false && isset($headers['Location'])) {
- return end($headers['Location']);
+ if (is_array($headers['Location'])) {
+ return end($headers['Location']);
+ }
+ return $headers['Location'];
}
return $url;
}