From 381f1807452b35acb442ce367b49887dd382d8c4 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 6 Aug 2015 21:21:56 +0200 Subject: [PATCH] Basic error catching in redirect script --- redirect.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/redirect.php b/redirect.php index d75b4ee..de9a40d 100644 --- a/redirect.php +++ b/redirect.php @@ -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"; + } }