Committer: ailyin
do not issue an SQL query with an empty IN() (also, what does this module do?)U trunk/cgi-bin/LJ/PromoText.pm
Modified: trunk/cgi-bin/LJ/PromoText.pm =================================================================== --- trunk/cgi-bin/LJ/PromoText.pm 2010-11-29 04:05:00 UTC (rev 9763) +++ trunk/cgi-bin/LJ/PromoText.pm 2010-11-30 03:52:51 UTC (rev 9764) @@ -155,6 +155,8 @@ $sets{$row->{setid}} = $row; } + return unless %sets; + # get the items of each set that the given effective class can see my $need_bind = join(",", map { "?" } keys %sets); $sth = $dbh->prepare("SELECT * FROM promo_item WHERE setid IN ($need_bind)");