]> xenbits.xensource.com Git - people/aperard/emesinae.git/commitdiff
CGI: Explicitly request a scalar on RHS of =>
authorIan Campbell <ian.campbell@citrix.com>
Tue, 7 Oct 2014 11:06:46 +0000 (12:06 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 7 Oct 2014 11:08:39 +0000 (12:08 +0100)
param() can return a list in that context, e.g. if the named param appears
twice in the URL, which is not going to work as expected.

CGI/bugs.pl

index 03994e4a8e7b92862df1dbd7086dd821edba9639..4d8b4a29e10dea6c2b061dbdfb6df9c027c78e72 100755 (executable)
@@ -126,7 +126,7 @@ print p(
 
 @bugs = Emesinae::Bug->listall(
     $dbh,
-    State      => param('state'),
+    State      => scalar param('state'),
     Severities => [ param('severityfilter') ],
     Affects    => [ param('affectsfilter') ],
 );