From c6199a77c658aba751391c123c3dec90745af59b Mon Sep 17 00:00:00 2001 From: alopexc0de Date: Sun, 7 Oct 2012 23:01:01 -0400 Subject: [PATCH] Fixed error with blank urls causing infinite loop --- short/index.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/short/index.php b/short/index.php index cbe452d..8244497 100755 --- a/short/index.php +++ b/short/index.php @@ -21,7 +21,7 @@ if(!$_POST['submit']) $dest=$_POST['dest']; if($_POST["submit"]) { - if(isset($_POST['dest'])) + if(isset($_POST['dest']) && $dest != "") { $myFile = $random.".html"; $fh = fopen($myFile, 'w') or die("can't open file"); @@ -47,7 +47,15 @@ your link is available here:
Home '; - } + }if($dest == ""){ + echo ' + Sorry, you are not able to shorten something without a url
+ Back to index
+ Home + +'; + + } } ?>