Skip to content

Commit

Permalink
Show error message when no url parameter was passed to shorten.php.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Dec 3, 2010
1 parent f45d78e commit dceebb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shorten.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

header('Content-Type: text/plain;charset=UTF-8');

$url = urldecode(trim($_GET['url']));
$url = isset($_GET['url']) ? urldecode(trim($_GET['url'])) : '';

if (in_array($url, array('', 'about:blank', 'undefined', 'http://localhost/'))) {
die('Enter a URL.');
Expand Down

0 comments on commit dceebb8

Please sign in to comment.