fix uninitialized value error
[radio.haze.st.git] / index.cgi
index 959c22d..7cce5c6 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-$template_file = "/home/ivan/radio/template.html";
+$template_file = "/home/ivan/radio.haze.st/template.html";
 
 use CGI;
 use HTML::Table;
@@ -68,7 +68,7 @@ use Text::Template;
     #'name'  => 'Echo Communication System',
     'name'  => 'Echo Communication System',
     'day'   => 'thursday',
-    'start' => '19',
+    'start' => '20',
     'len'   => '3',
     'url'   => 'http://www.theoverworld.com/echo/',
     'type'  => 'live',
@@ -91,7 +91,8 @@ $increment = 0.5;
 $showstart = 12;
 
 $cgi = new CGI;
-if ( $cgi->param('showstart') =~ /^(\d+)$/ ) {
+if ( defined($cgi->param('showstart'))
+     && $cgi->param('showstart') =~ /^(\d+)$/ ) {
   die unless $1 < 24;
   $showstart = $1;
 }