Basic error catching in redirect script

This commit is contained in:
Pierre Rudloff 2015-08-06 21:21:56 +02:00
parent bd46f6303e
commit 381f180745
1 changed files with 5 additions and 1 deletions

View File

@ -15,5 +15,9 @@ require_once 'common.php';
require_once 'download.php';
if (isset($_GET["url"])) {
$video = VideoDownload::getURL($_GET["url"]);
header('Location: '.$video['url']);
if (isset($video['url'])) {
header('Location: '.$video['url']);
} else {
echo "Can't find video";
}
}