Explorar o código

fix issue with uninit val warning

George Baugh %!s(int64=3) %!d(string=hai) anos
pai
achega
8fd91b6618
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/Trog/Routes/HTML.pm

+ 1 - 1
lib/Trog/Routes/HTML.pm

@@ -834,7 +834,7 @@ sub posts ($query, $direct=0) {
     }
 
     # Set the eTag so that we don't get a re-fetch
-    $query->{etag} = "$posts[0]{id}-$posts[0]{version}";
+    $query->{etag} = "$posts[0]{id}-$posts[0]{version}" if @posts;
 
     my $fmt = $query->{format} || '';
     return _rss($query,\@posts) if $fmt eq 'rss';