editproj.cgi: eliminate a source of uninitialized variable warnings
authorKyle J. McKay <mackyle@gmail.com>
Sat, 13 Jul 2013 17:32:46 +0000 (13 10:32 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Sat, 13 Jul 2013 17:32:46 +0000 (13 10:32 -0700)
cgi/editproj.cgi

index 9f89f99..ff052ab 100755 (executable)
@@ -51,7 +51,8 @@ if (!Girocco::Project::does_exist($name)) {
 my $proj = Girocco::Project->load($name);
 $proj or die "not found project $name, that's really weird!";
 
-if (($cgi->param('y0') eq 'Update' || $cgi->param('y0') eq 'Restart Mirroring') && $cgi->request_method eq 'POST') {
+my $y0 = $cgi->param('y0') || '';
+if (($y0 eq 'Update' || $y0 eq 'Restart Mirroring') && $cgi->request_method eq 'POST') {
        # submitted, let's see
        if ($proj->cgi_fill($gcgi) and $proj->authenticate($gcgi) and $proj->update) {
                print "<p class=\"updated\">Project successfully updated.</p>\n";