Explorar el Código

fix issue with uninit val warning

George Baugh hace 3 años
padre
commit
8fd91b6618
Se han modificado 1 ficheros con 1 adiciones y 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';