getURL() should not return an array

This commit is contained in:
Pierre Rudloff 2016-04-08 20:08:04 +02:00
parent f7f0a7b7f4
commit f14bec35ea
3 changed files with 13 additions and 11 deletions

View file

@ -225,8 +225,8 @@ class FrontController
global $app;
if (isset($_GET["url"])) {
try {
$video = $this->download->getURL($_GET["url"]);
return $response->withRedirect($video['url']);
$url = $this->download->getURL($_GET["url"]);
return $response->withRedirect($url);
} catch (\Exception $e) {
echo $e->getMessage().PHP_EOL;
return $response->withHeader('Content-Type', 'text/plain');