summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-08-19 14:23:13 +0200
committerYorhel <git@yorhel.nl>2020-08-19 14:23:13 +0200
commit5898a0a3ee189ef3e3da5fb92bf89385b5067a57 (patch)
treea04a96e8f008b43a4cc3b744041abf1a69168e77
parentcae561ee7e13c2ba238995468b5fe614d7ec15e0 (diff)
Reviews::Page: Fix perl warning about count being undef
-rw-r--r--lib/VNWeb/Reviews/Page.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/Reviews/Page.pm b/lib/VNWeb/Reviews/Page.pm
index 3e85e5e6..5f2671ac 100644
--- a/lib/VNWeb/Reviews/Page.pm
+++ b/lib/VNWeb/Reviews/Page.pm
@@ -78,7 +78,7 @@ TUWF::get qr{/$RE{wid}(?:(?<sep>[\./])$RE{num})?}, sub {
return tuwf->resNotFound if !auth->permReview; #XXX:While in beta
my($id, $sep, $num) = (tuwf->capture('id'), tuwf->capture('sep')||'', tuwf->capture('num'));
my $w = tuwf->dbRowi(
- 'SELECT r.id, r.vid, r.rid, r.summary, r.text, r.spoiler, c.count, r.c_up, r.c_down, uv.vote
+ 'SELECT r.id, r.vid, r.rid, r.summary, r.text, r.spoiler, COALESCE(c.count,0) AS count, r.c_up, r.c_down, uv.vote
, rel.title AS rtitle, rel.original AS roriginal, rel.type AS rtype, rv.vote AS my
, ', sql_user(), ',', sql_totime('r.date'), 'AS date,', sql_totime('r.lastmod'), 'AS lastmod
FROM reviews r